From 38c07d5531902ad4777b1ec949382722bd95b412 Mon Sep 17 00:00:00 2001 From: sajenim Date: Tue, 19 Dec 2023 09:21:33 +0800 Subject: [PATCH] setup nextcloud --- nixos/viridian/containers/default.nix | 1 + .../viridian/containers/nextcloud/default.nix | 23 +++++++++++++++++++ nixos/viridian/hardware-configuration.nix | 5 ++++ nixos/viridian/services/default.nix | 1 - 4 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 nixos/viridian/containers/nextcloud/default.nix diff --git a/nixos/viridian/containers/default.nix b/nixos/viridian/containers/default.nix index 4cfeb62..9dbf195 100644 --- a/nixos/viridian/containers/default.nix +++ b/nixos/viridian/containers/default.nix @@ -5,6 +5,7 @@ ./dashboard ./microbin ./multimedia + ./nextcloud ]; } diff --git a/nixos/viridian/containers/nextcloud/default.nix b/nixos/viridian/containers/nextcloud/default.nix new file mode 100644 index 0000000..085523c --- /dev/null +++ b/nixos/viridian/containers/nextcloud/default.nix @@ -0,0 +1,23 @@ +{ ... }: + +{ + virtualisation.oci-containers.containers = { + nextcloud-aio-mastercontainer = { + autoStart = true; + image = "nextcloud/all-in-one:latest"; + ports = [ + "8484:8080/tcp" # AIO Interface + ]; + volumes = [ + "nextcloud_aio_mastercontainer:/mnt/docker-aio-config" + "/var/run/docker.sock:/var/run/docker.sock:ro" + ]; + environment = { + NEXTCLOUD_DATADIR = "/srv/nextcloud"; + APACHE_PORT = "11000"; + APACHE_IP_BINDING = "0.0.0.0"; + }; + }; + }; +} + diff --git a/nixos/viridian/hardware-configuration.nix b/nixos/viridian/hardware-configuration.nix index d9e7075..2548592 100644 --- a/nixos/viridian/hardware-configuration.nix +++ b/nixos/viridian/hardware-configuration.nix @@ -28,6 +28,11 @@ fsType = "ext4"; }; + fileSystems."/srv/nextcloud" = + { device = "/dev/disk/by-uuid/443fcb5a-b814-4d33-8cfb-93f6ff4aca11"; + fsType = "ext4"; + }; + swapDevices = [ ]; diff --git a/nixos/viridian/services/default.nix b/nixos/viridian/services/default.nix index 6001ed8..cb76e97 100644 --- a/nixos/viridian/services/default.nix +++ b/nixos/viridian/services/default.nix @@ -6,7 +6,6 @@ ./home-assistant ./httpd ./minecraft-server - ./nextcloud ./traefik ]; }