From 26266dc088eaf87dc429bc1d9182586605e9dc72 Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Thu, 11 Apr 2024 19:51:10 +0200 Subject: [PATCH] enabled nextcloud --- .../hardware-configuration/disko-config.nix | 25 +++++++-------- nixos/machines/orbi/media-nextcloud.nix | 32 +------------------ nixos/machines/robi/configuration.nix | 2 +- 3 files changed, 14 insertions(+), 45 deletions(-) diff --git a/nixos/machines/orbi/hardware-configuration/disko-config.nix b/nixos/machines/orbi/hardware-configuration/disko-config.nix index b94e6ca..fc2c1a6 100644 --- a/nixos/machines/orbi/hardware-configuration/disko-config.nix +++ b/nixos/machines/orbi/hardware-configuration/disko-config.nix @@ -100,6 +100,18 @@ in compression = "lz4"; }; }; + "nextcloud" = { + type = "zfs_fs"; + mountpoint = "/var/lib/nixos-containers/nextcloud"; + options = { + mountpoint = "legacy"; + compression = "lz4"; + "com.sun:auto-snapshot:hourly" = toString true; + "com.sun:auto-snapshot:daily" = toString true; + #"com.sun:auto-snapshot:weekly" = false; + #"com.sun:auto-snapshot:monthly" = false; + }; + }; }; }; @@ -122,19 +134,6 @@ in #"com.sun:auto-snapshot:monthly" = false; }; }; - # todo make sure this disk has some minimum space - "nextcloud" = { - type = "zfs_fs"; - mountpoint = "/var/lib/nextcloud"; - options = { - mountpoint = "legacy"; - compression = "lz4"; - "com.sun:auto-snapshot:hourly" = toString true; - "com.sun:auto-snapshot:daily" = toString true; - #"com.sun:auto-snapshot:weekly" = false; - #"com.sun:auto-snapshot:monthly" = false; - }; - }; }; }; diff --git a/nixos/machines/orbi/media-nextcloud.nix b/nixos/machines/orbi/media-nextcloud.nix index 80b7fda..8af0423 100644 --- a/nixos/machines/orbi/media-nextcloud.nix +++ b/nixos/machines/orbi/media-nextcloud.nix @@ -9,7 +9,7 @@ let nextcloudUid = 1000; nextcloudGid = 1000; nextcloudPort = 8080; - nextcloudHostName = "cloud.ingolf-wagner.de"; + nextcloudHostName = "nextcloud.ingolf-wagner.de"; phpPackage = pkgs.php73; nextcloudPackage = pkgs.nextcloud28; @@ -17,10 +17,6 @@ let in { - - # host nginx - # ---------- - networking.firewall.allowedTCPPorts = [ 80 443 ]; networking.firewall.allowedUDPPorts = [ 80 443 ]; @@ -85,26 +81,6 @@ in mountPoint = "/run/secrets/nextcloud_database_password"; isReadOnly = true; }; - - #home = { - # # make sure this folder exist on the host - # hostPath = toString "/var/lib/nextcloud"; - # mountPoint = "/var/lib/nextcloud"; - # isReadOnly = false; - #}; - #db = { - # # make sure this folder exist on the host - # hostPath = toString "/var/lib/nextcloud_mysql"; - # mountPoint = "/var/lib/mysql"; - # isReadOnly = false; - #}; - #media = { - # #mountPoint = toString config.services.syncthing.folders.media.path; - # #hostPath = toString config.services.syncthing.folders.media.path; - # mountPoint = "/media/syncthing/media"; - # hostPath = "/media/media"; - # isReadOnly = true; - #}; }; privateNetwork = false; @@ -118,7 +94,6 @@ in #environment.etc."resolv.conf".text = "nameserver 8.8.8.8"; system.stateVersion = "23.11"; - #system.stateVersion = "21.05"; users.users.nextcloud.uid = nextcloudUid; @@ -133,9 +108,6 @@ in recommendedTlsSettings = lib.mkDefault true; }; - #networking.firewall.allowedTCPPorts = [ 80 ]; - #networking.firewall.allowedUDPPorts = [ 80 ]; - # nextcloud database # ================== # @@ -199,8 +171,6 @@ in enable = true; package = nextcloudPackage; autoUpdateApps.enable = true; - # nginx.enable = true; - # enableBrokenCiphersForSSE = false; # see https://github.com/NixOS/nixpkgs/pull/198470 hostName = nextcloudHostName; logLevel = 2; https = true; diff --git a/nixos/machines/robi/configuration.nix b/nixos/machines/robi/configuration.nix index 1aed6ea..9a8a0d9 100644 --- a/nixos/machines/robi/configuration.nix +++ b/nixos/machines/robi/configuration.nix @@ -12,7 +12,7 @@ ./borg.nix ./codimd.nix ./gitea.nix - ./nextcloud.nix + #./nextcloud.nix ./packages.nix ./taskserver.nix ./vaultwarden.nix