diff --git a/configurations/server.nix b/configurations/server.nix index 560f098..d539a88 100644 --- a/configurations/server.nix +++ b/configurations/server.nix @@ -113,9 +113,9 @@ let hostName = "${xlib.device.hostname}"; networkmanager.enable = true; firewall.enable = false; - nameservers = [ - "127.0.0.1" - ]; + # nameservers = [ + # "127.0.0.1" + # ]; }; system = { diff --git a/modules/essentials/settings.nix b/modules/essentials/settings.nix index fc24c65..069676f 100644 --- a/modules/essentials/settings.nix +++ b/modules/essentials/settings.nix @@ -77,6 +77,19 @@ MEYCIQD1coTa7hqU1PAdnamAIgq1ApadDWpWfNaXPGiLCrkxTwIhAJhj/YSzqTJR HvurdJ9m2glxV3rQHIUiVqKbQRcibObd -----END CERTIFICATE----- + -----BEGIN CERTIFICATE----- + MIIBvjCCAWOgAwIBAgIRAMiJigRk8xbvHhCWN6a7D68wCgYIKoZIzj0EAwIwKDEO + MAwGA1UEChMFWmVyb1ExFjAUBgNVBAMTDVplcm9RIFJvb3QgQ0EwHhcNMjYwNjEz + MjI1NjA3WhcNMzYwNjEwMjI1NjA3WjAwMQ4wDAYDVQQKEwVaZXJvUTEeMBwGA1UE + AxMVWmVyb1EgSW50ZXJtZWRpYXRlIENBMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcD + QgAE2gUlKZ/z9kt5RrdYZHnGE1TVVegn+aDmGpZk5uvF04O9k/sfjD6QE7VtjwNH + ervZKu3iBXGRg92ba0k369VJpKNmMGQwDgYDVR0PAQH/BAQDAgEGMBIGA1UdEwEB + /wQIMAYBAf8CAQAwHQYDVR0OBBYEFCtYg4LEAHPIMrDPO7lrxKuFvw4PMB8GA1Ud + IwQYMBaAFH07/1blaqp0MVuSZIUHS9W3SjIrMAoGCCqGSM49BAMCA0kAMEYCIQD2 + nNNHqs9/mIstOxetObgg8eqbrPWHXEVQ9CDucNFmQAIhANXAz2z1Rc7hxc6er23W + I8TU6UQc8dledPvalDJLyGym + -----END CERTIFICATE----- + '' ]; }; diff --git a/modules/server/bentopdf.nix b/modules/server/bentopdf.nix index 3b21a50..858ef17 100644 --- a/modules/server/bentopdf.nix +++ b/modules/server/bentopdf.nix @@ -9,8 +9,14 @@ { services.bentopdf = { enable = true; - domain = "bentopdf.local"; - nginx.enable = true; + domain = "pdf.home.arpa"; + nginx = { + enable = true; + # virtualHost = { + # forceSSL = true; + # enableACME = true; + # }; + }; # package = pkgs-stable.bentopdf; }; } diff --git a/modules/server/coredns.nix b/modules/server/coredns.nix index e06f2cc..a2982ad 100644 --- a/modules/server/coredns.nix +++ b/modules/server/coredns.nix @@ -9,19 +9,16 @@ config = '' zeroq.su:53 { hosts { - 192.168.1.20 agent.zeroq.su - 192.168.1.20 bentopdf.zeroq.su - 192.168.1.20 calibre.zeroq.su - 192.168.1.20 dns.zeroq.su - 192.168.1.20 flux.zeroq.su - 192.168.1.20 gitea.zeroq.su - 192.168.1.20 health.zeroq.su - 192.168.1.20 immich.zeroq.su - 192.168.1.20 kuma.zeroq.su - 192.168.1.20 n8n.zeroq.su - 192.168.1.20 nextcloud.zeroq.su - 192.168.1.20 office.zeroq.su 109.248.161.5 x.zeroq.su + 192.168.1.20 calibre.home.arpa + 192.168.1.20 dns.home.arpa + 192.168.1.20 flux.home.arpa + 192.168.1.20 git.home.arpa + 192.168.1.20 immich.home.arpa + 192.168.1.20 kuma.home.arpa + 192.168.1.20 nextcloud.home.arpa + 192.168.1.20 office.home.arpa + 192.168.1.20 pdf.home.arpa fallthrough } cache 300 diff --git a/modules/server/nextcloud.nix b/modules/server/nextcloud.nix index 4460ad8..c1919b7 100644 --- a/modules/server/nextcloud.nix +++ b/modules/server/nextcloud.nix @@ -18,7 +18,7 @@ in nextcloud-whiteboard-server = { enable = true; settings = { - NEXTCLOUD_URL = "http://nextcloud.private"; + NEXTCLOUD_URL = "https://nextcloud.home.arpa"; }; secrets = [ config.sops.secrets.nextcloud-whiteboard-jwt.path ]; }; @@ -47,22 +47,22 @@ in "100.64.0.0" "192.168.1.20" "localhost" - "nextcloud.local" "nextcloud.private" "nextcloud.zeroq.su" - "office.local" "office.zeroq.su" + "office.home.arpa" + "nextcloud.home.arpa" ]; trusted_proxies = [ "100.64.1.0" "109.248.161.5" ]; - overwriteprotocol = ""; # maybe no + overwriteprotocol = "https"; # maybe no }; extraAppsEnable = true; appstoreEnable = false; notify_push = { - enable = false; + enable = true; bendDomainToLocalhost = true; }; # phpPackage = pkgs.php85; @@ -137,7 +137,7 @@ in # }; onlyoffice = { enable = true; - hostname = "office.local"; + hostname = "office.home.arpa"; port = 8090; allowLocalConnections = true; wopi = true; diff --git a/modules/server/nginx.nix b/modules/server/nginx.nix index 91c818c..b4752c2 100644 --- a/modules/server/nginx.nix +++ b/modules/server/nginx.nix @@ -31,11 +31,11 @@ in } ]; }; - "office.local" = { - forceSSL = false; - enableACME = false; + "office.home.arpa" = { + forceSSL = true; + enableACME = true; }; - "bentopdf.local" = { + "pdf.home.arpa" = { forceSSL = false; enableACME = false; listen = [ @@ -56,9 +56,9 @@ in client_max_body_size 5G; ''; }; - "nextcloud.local" = { - forceSSL = false; - enableACME = false; + "nextcloud.home.arpa" = { + forceSSL = true; + enableACME = true; locations = { "/" = { proxyPass = "http://${server}:10000"; @@ -73,18 +73,7 @@ in client_max_body_size 5G; ''; }; - "gitea.zeroq.su" = { - forceSSL = true; - enableACME = true; - locations."/" = { - proxyPass = "http://${server}:3000"; - proxyWebsockets = true; - }; - extraConfig = '' - client_max_body_size 5G; - ''; - }; - "ca.zeroq.su" = { + "ca.home.arpa" = { forceSSL = false; enableACME = false; locations."/" = { @@ -95,9 +84,9 @@ in client_max_body_size 5G; ''; }; - "gitea.local" = { - forceSSL = false; - enableACME = false; + "git.home.arpa" = { + forceSSL = true; + enableACME = true; locations."/" = { proxyPass = "http://${server}:3000"; proxyWebsockets = true; @@ -106,69 +95,36 @@ in client_max_body_size 5G; ''; }; - "nextcloud.zeroq.su" = { - forceSSL = false; - enableACME = false; - locations = { - "/" = { - proxyPass = "http://${server}:10000"; - proxyWebsockets = true; - }; - "/whiteboard" = { - proxyPass = "http://${server}:3002"; - proxyWebsockets = true; - }; - }; - extraConfig = '' - client_max_body_size 5G; - ''; - }; - "n8n.local" = { - forceSSL = false; - enableACME = false; - locations."/" = { - proxyPass = "http://${server}:5678"; - proxyWebsockets = true; - }; - extraConfig = '' - client_max_body_size 5G; - ''; - }; - "kuma.local" = { - forceSSL = false; - enableACME = false; + # "n8n.home.arpa" = { + # forceSSL = true; + # enableACME = true; + # locations."/" = { + # proxyPass = "http://${server}:5678"; + # proxyWebsockets = true; + # }; + # extraConfig = '' + # client_max_body_size 5G; + # ''; + # }; + "kuma.home.arpa" = { + forceSSL = true; + enableACME = true; locations."/" = { proxyPass = "http://${server}:4001"; proxyWebsockets = true; }; }; - "health.local" = { - forceSSL = false; - enableACME = false; - locations."/" = { - proxyPass = "http://${server}:19999"; - proxyWebsockets = true; - }; - }; - "agent.local" = { - forceSSL = false; - enableACME = false; - locations."/" = { - proxyPass = "http://${server}:3000"; - proxyWebsockets = true; - }; - }; - "flux.local" = { - forceSSL = false; - enableACME = false; + "flux.home.arpa" = { + addSSL = true; + enableACME = true; locations."/" = { proxyPass = "http://${server}:6061"; proxyWebsockets = true; }; }; - "immich.local" = { - forceSSL = false; - enableACME = false; + "immich.home.arpa" = { + addSSL = true; + enableACME = true; locations."/" = { proxyPass = "http://${server}:2283"; proxyWebsockets = true; @@ -177,9 +133,9 @@ in client_max_body_size 5G; ''; }; - "calibre.local" = { - forceSSL = false; - enableACME = false; + "calibre.home.arpa" = { + forceSSL = true; + enableACME = true; locations."/" = { proxyPass = "http://${server}:8083"; proxyWebsockets = true; @@ -188,7 +144,7 @@ in client_max_body_size 5G; ''; }; - # "zeroq.local" = { + # "zeroq.home.arpa" = { # forceSSL = false; # enableACME = false; # root = pkgs.writeTextDir "index.html" '' diff --git a/modules/server/step-ca.nix b/modules/server/step-ca.nix index de41a45..ee61016 100644 --- a/modules/server/step-ca.nix +++ b/modules/server/step-ca.nix @@ -23,6 +23,7 @@ in # address = "0.0.0.0:9000"; dnsNames = [ "*.zeroq.su" + "*.home.arpa" "localhost" ]; db = {