From 6948424b81e41c4335c9ff13d95ce1534703d644 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Mon, 25 Dec 2023 19:42:20 +0100 Subject: [PATCH] nixos: services: remove redundant subdomains See previous commit for the defaults. --- modules/nixos/services/blog/default.nix | 1 - modules/nixos/services/calibre-web/default.nix | 1 - modules/nixos/services/drone/server/default.nix | 1 - modules/nixos/services/flood/default.nix | 1 - modules/nixos/services/gitea/default.nix | 2 -- modules/nixos/services/indexers/default.nix | 3 --- modules/nixos/services/jellyfin/default.nix | 1 - modules/nixos/services/lohr/default.nix | 1 - modules/nixos/services/matrix/default.nix | 4 ---- modules/nixos/services/miniflux/default.nix | 1 - modules/nixos/services/monitoring/default.nix | 1 - modules/nixos/services/navidrome/default.nix | 1 - modules/nixos/services/nginx/default.nix | 1 - modules/nixos/services/nix-cache/default.nix | 1 - modules/nixos/services/paperless/default.nix | 1 - modules/nixos/services/pirate/default.nix | 1 - modules/nixos/services/podgrab/default.nix | 1 - modules/nixos/services/sabnzbd/default.nix | 1 - modules/nixos/services/tandoor-recipes/default.nix | 1 - modules/nixos/services/transmission/default.nix | 1 - modules/nixos/services/vikunja/default.nix | 3 +-- modules/nixos/services/woodpecker/server/default.nix | 2 -- 22 files changed, 1 insertion(+), 30 deletions(-) diff --git a/modules/nixos/services/blog/default.nix b/modules/nixos/services/blog/default.nix index 38ada5e..3e68df2 100644 --- a/modules/nixos/services/blog/default.nix +++ b/modules/nixos/services/blog/default.nix @@ -5,7 +5,6 @@ let domain = config.networking.domain; makeHostInfo = subdomain: { - inherit subdomain; root = "/var/www/${subdomain}"; }; diff --git a/modules/nixos/services/calibre-web/default.nix b/modules/nixos/services/calibre-web/default.nix index fe53b7e..b7bf9df 100644 --- a/modules/nixos/services/calibre-web/default.nix +++ b/modules/nixos/services/calibre-web/default.nix @@ -42,7 +42,6 @@ in my.services.nginx.virtualHosts = { library = { - subdomain = "library"; inherit (cfg) port; }; }; diff --git a/modules/nixos/services/drone/server/default.nix b/modules/nixos/services/drone/server/default.nix index 2207765..a3a1e49 100644 --- a/modules/nixos/services/drone/server/default.nix +++ b/modules/nixos/services/drone/server/default.nix @@ -47,7 +47,6 @@ in my.services.nginx.virtualHosts = { drone = { - subdomain = "drone"; inherit (cfg) port; }; }; diff --git a/modules/nixos/services/flood/default.nix b/modules/nixos/services/flood/default.nix index e227dde..155e73d 100644 --- a/modules/nixos/services/flood/default.nix +++ b/modules/nixos/services/flood/default.nix @@ -42,7 +42,6 @@ in my.services.nginx.virtualHosts = { flood = { - subdomain = "flood"; inherit (cfg) port; }; }; diff --git a/modules/nixos/services/gitea/default.nix b/modules/nixos/services/gitea/default.nix index 4d5429e..4a8a3bb 100644 --- a/modules/nixos/services/gitea/default.nix +++ b/modules/nixos/services/gitea/default.nix @@ -119,12 +119,10 @@ in my.services.nginx.virtualHosts = { # Proxy to Gitea git = { - subdomain = "git"; inherit (cfg) port; }; # Redirect `gitea.` to actual forge subdomain gitea = { - subdomain = "gitea"; redirect = config.services.gitea.settings.server.ROOT_URL; }; }; diff --git a/modules/nixos/services/indexers/default.nix b/modules/nixos/services/indexers/default.nix index ff2d91c..8a42345 100644 --- a/modules/nixos/services/indexers/default.nix +++ b/modules/nixos/services/indexers/default.nix @@ -30,7 +30,6 @@ in my.services.nginx.virtualHosts = { jackett = { - subdomain = "jackett"; port = jackettPort; }; }; @@ -43,7 +42,6 @@ in my.services.nginx.virtualHosts = { nzbhydra = { - subdomain = "nzbhydra"; port = nzbhydraPort; }; }; @@ -56,7 +54,6 @@ in my.services.nginx.virtualHosts = { prowlarr = { - subdomain = "prowlarr"; port = prowlarrPort; }; }; diff --git a/modules/nixos/services/jellyfin/default.nix b/modules/nixos/services/jellyfin/default.nix index 326dab3..9efe11e 100644 --- a/modules/nixos/services/jellyfin/default.nix +++ b/modules/nixos/services/jellyfin/default.nix @@ -19,7 +19,6 @@ in my.services.nginx.virtualHosts = { jellyfin = { - subdomain = "jellyfin"; port = 8096; extraConfig = { locations."/" = { diff --git a/modules/nixos/services/lohr/default.nix b/modules/nixos/services/lohr/default.nix index af292cc..dd4eea8 100644 --- a/modules/nixos/services/lohr/default.nix +++ b/modules/nixos/services/lohr/default.nix @@ -100,7 +100,6 @@ in my.services.nginx.virtualHosts = { lohr = { - subdomain = "lohr"; inherit (cfg) port; }; }; diff --git a/modules/nixos/services/matrix/default.nix b/modules/nixos/services/matrix/default.nix index 3328747..bd2a017 100644 --- a/modules/nixos/services/matrix/default.nix +++ b/modules/nixos/services/matrix/default.nix @@ -120,7 +120,6 @@ in my.services.nginx.virtualHosts = { # Element Web app deployment chat = { - subdomain = "chat"; root = pkgs.element-web.override { conf = { default_server_config = { @@ -148,16 +147,13 @@ in }; # Dummy VHosts for port collision detection matrix-federation = { - subdomain = "matrix-federation"; port = federationPort.private; }; matrix-client = { - subdomain = "matrix-client"; port = clientPort.private; }; # Sliding sync matrix-sync = { - subdomain = "matrix-sync"; inherit (cfg.slidingSync) port; }; }; diff --git a/modules/nixos/services/miniflux/default.nix b/modules/nixos/services/miniflux/default.nix index 07eb6f8..5104c8b 100644 --- a/modules/nixos/services/miniflux/default.nix +++ b/modules/nixos/services/miniflux/default.nix @@ -45,7 +45,6 @@ in my.services.nginx.virtualHosts = { reader = { - subdomain = "reader"; inherit (cfg) port; }; }; diff --git a/modules/nixos/services/monitoring/default.nix b/modules/nixos/services/monitoring/default.nix index 2f23ff0..49919c1 100644 --- a/modules/nixos/services/monitoring/default.nix +++ b/modules/nixos/services/monitoring/default.nix @@ -127,7 +127,6 @@ in my.services.nginx.virtualHosts = { monitoring = { - subdomain = "monitoring"; inherit (cfg.grafana) port; }; }; diff --git a/modules/nixos/services/navidrome/default.nix b/modules/nixos/services/navidrome/default.nix index 92f9fd2..944a97a 100644 --- a/modules/nixos/services/navidrome/default.nix +++ b/modules/nixos/services/navidrome/default.nix @@ -49,7 +49,6 @@ in my.services.nginx.virtualHosts = { music = { - subdomain = "music"; inherit (cfg) port; }; }; diff --git a/modules/nixos/services/nginx/default.nix b/modules/nixos/services/nginx/default.nix index e916c9c..ae6c0dc 100644 --- a/modules/nixos/services/nginx/default.nix +++ b/modules/nixos/services/nginx/default.nix @@ -404,7 +404,6 @@ in my.services.nginx.virtualHosts = { login = { - subdomain = "login"; inherit (cfg.sso) port; }; }; diff --git a/modules/nixos/services/nix-cache/default.nix b/modules/nixos/services/nix-cache/default.nix index 5517a78..1ce3161 100644 --- a/modules/nixos/services/nix-cache/default.nix +++ b/modules/nixos/services/nix-cache/default.nix @@ -45,7 +45,6 @@ in my.services.nginx.virtualHosts = { cache = { - subdomain = "cache"; inherit (cfg) port; }; }; diff --git a/modules/nixos/services/paperless/default.nix b/modules/nixos/services/paperless/default.nix index 87a816a..c40e895 100644 --- a/modules/nixos/services/paperless/default.nix +++ b/modules/nixos/services/paperless/default.nix @@ -145,7 +145,6 @@ in my.services.nginx.virtualHosts = { paperless = { - subdomain = "paperless"; inherit (cfg) port; sso = { enable = true; diff --git a/modules/nixos/services/pirate/default.nix b/modules/nixos/services/pirate/default.nix index 88a2250..e500b54 100644 --- a/modules/nixos/services/pirate/default.nix +++ b/modules/nixos/services/pirate/default.nix @@ -23,7 +23,6 @@ let mkRedirection = service: { my.services.nginx.virtualHosts = { ${service} = { - subdomain = service; port = ports.${service}; }; }; diff --git a/modules/nixos/services/podgrab/default.nix b/modules/nixos/services/podgrab/default.nix index e59b20d..5ceebb6 100644 --- a/modules/nixos/services/podgrab/default.nix +++ b/modules/nixos/services/podgrab/default.nix @@ -33,7 +33,6 @@ in my.services.nginx.virtualHosts = { podgrab = { - subdomain = "podgrab"; inherit (cfg) port; }; }; diff --git a/modules/nixos/services/sabnzbd/default.nix b/modules/nixos/services/sabnzbd/default.nix index 42058e7..9e0d9c3 100644 --- a/modules/nixos/services/sabnzbd/default.nix +++ b/modules/nixos/services/sabnzbd/default.nix @@ -20,7 +20,6 @@ in my.services.nginx.virtualHosts = { sabnzbd = { - subdomain = "sabnzbd"; inherit port; }; }; diff --git a/modules/nixos/services/tandoor-recipes/default.nix b/modules/nixos/services/tandoor-recipes/default.nix index 353fac3..f5dc2db 100644 --- a/modules/nixos/services/tandoor-recipes/default.nix +++ b/modules/nixos/services/tandoor-recipes/default.nix @@ -72,7 +72,6 @@ in my.services.nginx.virtualHosts = { recipes = { - subdomain = "recipes"; inherit (cfg) port; }; }; diff --git a/modules/nixos/services/transmission/default.nix b/modules/nixos/services/transmission/default.nix index ce7f9e6..aeb88b7 100644 --- a/modules/nixos/services/transmission/default.nix +++ b/modules/nixos/services/transmission/default.nix @@ -82,7 +82,6 @@ in # seems to have stalled my.services.nginx.virtualHosts = { transmission = { - subdomain = "transmission"; inherit (cfg) port; }; }; diff --git a/modules/nixos/services/vikunja/default.nix b/modules/nixos/services/vikunja/default.nix index 425698d..9767d00 100644 --- a/modules/nixos/services/vikunja/default.nix +++ b/modules/nixos/services/vikunja/default.nix @@ -60,8 +60,7 @@ in # This is a weird setup my.services.nginx.virtualHosts = { - vikunja = { - inherit subdomain; + ${subdomain} = { # Serve the root for the web-ui root = config.services.vikunja.package-frontend; diff --git a/modules/nixos/services/woodpecker/server/default.nix b/modules/nixos/services/woodpecker/server/default.nix index b5ec0d8..f02a5c5 100644 --- a/modules/nixos/services/woodpecker/server/default.nix +++ b/modules/nixos/services/woodpecker/server/default.nix @@ -54,12 +54,10 @@ in my.services.nginx.virtualHosts = { woodpecker = { - subdomain = "woodpecker"; inherit (cfg) port; }; # I might want to be able to RPC from other hosts in the future woodpecker-rpc = { - subdomain = "woodpecker-rpc"; port = cfg.rpcPort; }; };