diff --git a/host/configuration.nix b/host/configuration.nix index 3a44554..058cceb 100644 --- a/host/configuration.nix +++ b/host/configuration.nix @@ -54,7 +54,7 @@ actualBudget.enable = true; gitea.enable = true; syncthing.enable = true; - nextcloud.enable = false; + nextcloud.enable = true; wakapi.enable = true; eko.enable = true; diff --git a/nixosModules/nextcloud.nix b/nixosModules/nextcloud.nix index 67e9575..ddbfb11 100644 --- a/nixosModules/nextcloud.nix +++ b/nixosModules/nextcloud.nix @@ -21,12 +21,13 @@ services.nginx.virtualHosts.${config.services.nextcloud.hostName} = { forceSSL = true; - useACMEHost = "kyren.codes"; + enableACME = true; + # useACMEHost = "kyren.codes"; }; # Define the password and disable php from caching the path to it sops.secrets.nextcloud-admin-password = { owner = "nextcloud"; group = "nextcloud"; }; - services.nextcloud.phpOptions."realpath_cache_size" = "0"; + # services.nextcloud.phpOptions."realpath_cache_size" = "0"; sops.secrets.nextcloud-kyren-password = { owner = "nextcloud"; group = "nextcloud"; }; @@ -34,17 +35,42 @@ enable = true; package = pkgs.nextcloud29; hostName = "nextcloud.kyren.codes"; + database.createLocally = true; + configureRedis = true; + + maxUploadSize = "16G"; + https = true; + enableBrokenCiphersForSSE = false; + + autoUpdateApps.enable = true; + extraAppsEnable = true; + extraApps = with config.services.nextcloud.package.packages.apps; { + # List of apps we want to install and are already packaged in + # https://github.com/NixOS/nixpkgs/blob/master/pkgs/servers/nextcloud/packages/nextcloud-apps.json + inherit calendar contacts mail notes tasks; + + # Custom app installation example. + # cookbook = pkgs.fetchNextcloudApp rec { + # url = + # "https://github.com/nextcloud/cookbook/releases/download/v0.10.2/Cookbook-0.10.2.tar.gz"; + # sha256 = "sha256-XgBwUr26qW6wvqhrnhhhhcN4wkI+eXDHnNSm1HDbP6M="; + # }; + }; + config = { + overwriteProtocol = "https"; + defaultPhoneRegion = "PT"; dbtype = "pgsql"; + adminuser = "admin"; adminpassFile = config.sops.secrets.nextcloud-admin-password.path; }; - ensureUsers = { - kyren = { - email = "kyren223@proton.em"; - passwordFile = config.sops.secrets.nextcloud-kyren-password.path; - }; - }; + # ensureUsers = { + # kyren = { + # email = "kyren223@proton.me"; + # passwordFile = config.sops.secrets.nextcloud-kyren-password.path; + # }; + # }; }; }; }