From 66f9703e962e51da3c4f428080052b8b7be9178f Mon Sep 17 00:00:00 2001 From: Andre Date: Sun, 29 Dec 2024 02:22:32 +0000 Subject: [PATCH] Services: get Nextcloud configured correctly --- modules/nixos/services/nextcloud/default.nix | 8 +++++++- systems/x86_64-linux/Hevana/default.nix | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/nixos/services/nextcloud/default.nix b/modules/nixos/services/nextcloud/default.nix index e35dd05..c3cbb1d 100644 --- a/modules/nixos/services/nextcloud/default.nix +++ b/modules/nixos/services/nextcloud/default.nix @@ -32,6 +32,7 @@ in enable = true; home = cfg.home; hostName = cfg.url; + https = true; appstoreEnable = true; maxUploadSize = "10G"; nginx.recommendedHttpHeaders = true; @@ -43,7 +44,7 @@ in # Set default admin password config.adminpassFile = "${pkgs.writeText "nextcloud-default-pass" '' - config.${namespace}.secrets.services.defaultPassword; + ${config.${namespace}.secrets.services.defaultPassword} ''}"; settings = { @@ -57,6 +58,11 @@ in mail_sendmailmode = "pipe"; }; }; + + nginx.virtualHosts."${cfg.url}" = { + useACMEHost = lib.${namespace}.getDomainFromURI cfg.url; + forceSSL = true; + }; }; systemd.services = { diff --git a/systems/x86_64-linux/Hevana/default.nix b/systems/x86_64-linux/Hevana/default.nix index 1f6fcdd..0b78d30 100644 --- a/systems/x86_64-linux/Hevana/default.nix +++ b/systems/x86_64-linux/Hevana/default.nix @@ -214,7 +214,7 @@ in }; }; nextcloud = { - enable = false; + enable = true; url = config.${namespace}.secrets.services.nextcloud.url; home = "${services-root}/nextcloud"; };