diff --git a/configuration.nix b/configuration.nix index 55f2816..ebf644a 100644 --- a/configuration.nix +++ b/configuration.nix @@ -50,6 +50,7 @@ in userServices = true; }; }; + services.printing = { listenAddresses = [ "*:631" ]; allowFrom = [ "all" ]; @@ -88,6 +89,10 @@ in isNormalUser = true; extraGroups = [ "networkmanager" "wheel" "video" "scanner" "lp" "plugdev" ]; }; + users.users.nextcloud = { + extraGroups = [ "nfsShare" ]; + isSystemUser = true; + }; # OpenGL and drivers hardware.opengl = { @@ -164,9 +169,23 @@ in locations."/" = { proxyPass = "http://127.0.0.1:8073"; proxyWebsockets = true; - }; }; - }; + + # Nextcloud Proxy + "cloud.${cornDomain}" = { + enableACME = true; + addSSL = true; + locations."/" = { + proxyWebsockets = true; + extraConfig = " + location /.well-known/carddav { + return 301 $scheme://$host/remote.php/dav; + } + location /.well-known/caldav { + return 301 $scheme://$host/remote.php/dav; + }; + }; + }; appendConfig = '' rtmp { server { @@ -183,6 +202,23 @@ in ''; }; + # Nextcloud server + nextcloud = { + enable = true; + package = pkgs.nextcloud29; + hostName = "cloud.${cornDomain}"; + datadir = "/nextcloud"; + https = true; + config = { + adminuser = "freecorn"; + adminpassFile = "/nextcloud/password.txt"; + }; + settings = { + trusted_proxies = [ "127.0.0.1" ]; + trusted_domains = [ "cloud.${cornDomain}" ]; + overwriteprotocol = "https"; + }; + # Get certificates for Coturn security.acme = { acceptTerms = true;