diff --git a/dragonwell/atproto.nix b/dragonwell/atproto.nix index 6e417feeead24caea4be1ccbaff2e4ffb13d8a8c..f94314d3dc48adc856fcd9637881776283db75e6 100644 --- a/dragonwell/atproto.nix +++ b/dragonwell/atproto.nix @@ -1,7 +1,4 @@ { config, ... }: -let - port = 2759; -in { age.secrets.pds.file = ../secrets/pds.age; services = { @@ -9,7 +6,7 @@ bluesky-pds = { enable = true; pdsadmin.enable = true; settings = { - PDS_PORT = port; + PDS_PORT = 2759; PDS_HOSTNAME = "pds.jolheiser.com"; }; environmentFiles = [ @@ -17,7 +14,7 @@ config.age.secrets.pds.path ]; }; caddy.virtualHosts."pds.jolheiser.com".extraConfig = '' - reverse_proxy localhost:${builtins.toString port} + reverse_proxy localhost:2759 ''; }; } diff --git a/dragonwell/foundry.nix b/dragonwell/foundry.nix index fce651798f88395091511064d599bc200b9b78f7..ef110dd8b1ad98733cdabd7883b8744da8043a26 100644 --- a/dragonwell/foundry.nix +++ b/dragonwell/foundry.nix @@ -1,12 +1,8 @@ { inputs, pkgs, ... }: -let - port = 30000; -in { services = { foundryvtt = { enable = true; - inherit port; hostName = "dnd.jolheiser.com"; minifyStaticFiles = true; proxyPort = 443; @@ -15,7 +11,7 @@ upnp = false; package = inputs.foundry.packages.${pkgs.stdenv.hostPlatform.system}.foundryvtt_14; }; caddy.virtualHosts."dnd.jolheiser.com".extraConfig = '' - reverse_proxy localhost:${builtins.toString port} + reverse_proxy localhost:30000 ''; }; } diff --git a/dragonwell/git-bug.nix b/dragonwell/git-bug.nix index 03021813b6386cf94b1695145150219615a739df..c7bfe2ae4a07f506a4365622912a742f7b52a215 100644 --- a/dragonwell/git-bug.nix +++ b/dragonwell/git-bug.nix @@ -1,6 +1,3 @@ -let - port = 2847; -in { services = { git-bug.bugs = { @@ -10,12 +7,12 @@ authorUser = "jolheiser"; authorEmail = "bugs@jolheiser.com"; authorAvatar = "https://www.libravatar.org/avatar/cc498b605dee7b6fb9e6422332691bb4"; host = "localhost"; - inherit port; + port = 2847; }; tailproxy.bugs = { enable = false; hostname = "bugs"; - inherit port; + port = 2847; authKey = ""; # One-time key }; }; diff --git a/dragonwell/git-pr.nix b/dragonwell/git-pr.nix index 4f18805427e380469adea6acbec985cde41aea28..f5d249d359e6b7ec3412a8db60e973f7008f1bbd 100644 --- a/dragonwell/git-pr.nix +++ b/dragonwell/git-pr.nix @@ -1,6 +1,3 @@ -let - port = 7449; -in { services = { git-pr = { @@ -10,7 +7,7 @@ url = "pr.jolheiser.com"; admins = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJXoiWcPkL5kUAqJfMxnPM/ND4qJ4kKShDhXdqnYv2ZB" ]; sshPort = 7448; enableWeb = true; - webPort = port; + webPort = 7449; theme = "catppuccin-mocha"; timeFormat = "01/02/2006 at 03:04:05PM"; repos = [ @@ -27,7 +24,7 @@ } ]; }; caddy.virtualHosts."pr.jolheiser.com".extraConfig = '' - reverse_proxy localhost:${builtins.toString port} + reverse_proxy localhost:7449 ''; }; } diff --git a/dragonwell/gollum.nix b/dragonwell/gollum.nix index 0625aadc724edb60e39f7623c0c1ef044815ce69..a1216f5260060c6d9c164e47ab8c79937891d2c4 100644 --- a/dragonwell/gollum.nix +++ b/dragonwell/gollum.nix @@ -1,7 +1,4 @@ { pkgs, config, ... }: -let - port = 9454; -in { services = { gollum = { @@ -9,7 +6,7 @@ enable = true; stateDir = "/var/lib/ugit/repos/wiki.git"; emoji = true; h1-title = true; - inherit port; + port = 9454; branch = "main"; user = "ugit"; group = "ugit"; @@ -34,7 +31,7 @@ redir * /oauth2/sign_in?rd={scheme}://{host}{uri} } } - reverse_proxy localhost:${builtins.toString port} + reverse_proxy localhost:9454 } ''; }; diff --git a/dragonwell/mealie.nix b/dragonwell/mealie.nix index d397f55d222a19c4506ad493c4bd6f16f704d508..1f4b0e4ffd930690d0f1972d7243d1fd32e5f177 100644 --- a/dragonwell/mealie.nix +++ b/dragonwell/mealie.nix @@ -1,7 +1,4 @@ { pkgs, config, ... }: -let - port = 3663; -in { age.secrets.mealie.file = ../secrets/mealie.age; services = { @@ -16,7 +13,7 @@ installCheckPhase = ''echo "Skipping install tests for mealie"''; } ); listenAddress = "localhost"; - inherit port; + port = 3663; settings = { BASE_URL = "https://recipes.jolheiser.com"; ALLOW_PASSWORD_LOGIN = "false"; @@ -24,7 +21,7 @@ }; credentialsFile = config.age.secrets.mealie.path; }; caddy.virtualHosts."recipes.jolheiser.com".extraConfig = '' - reverse_proxy localhost:${builtins.toString port} + reverse_proxy localhost:3663 ''; }; } diff --git a/dragonwell/miniserve.nix b/dragonwell/miniserve.nix index d4cd4b55b97b71c76e1dcb1e960e29560a88f613..8905b1380508bd53125223ee2bf8cd2330961d3e 100644 --- a/dragonwell/miniserve.nix +++ b/dragonwell/miniserve.nix @@ -1,11 +1,8 @@ -let - port = 3453; -in { services = { miniserve = { enable = true; - inherit port; + port = 3453; showHidden = true; uploadFiles = ""; mkdir = true; @@ -22,7 +19,7 @@ }; tailproxy.miniserve = { enable = true; hostname = "files"; - inherit port; + port = 3453; authKey = "tskey-auth-kNNZJXfSDb11CNTRL-DsdZPygdA7Lrye5WJjnr6LGNffgzo3PUH"; # One-time key }; }; diff --git a/dragonwell/mint.nix b/dragonwell/mint.nix index 679b5ce611e9d53a9d12a2a0084e886557add363..5d430ef2470f9fd74f25dd161ece77ed27c9e45a 100644 --- a/dragonwell/mint.nix +++ b/dragonwell/mint.nix @@ -1,18 +1,9 @@ -{ - inputs, - pkgs, - config, - ... -}: -let - port = 6468; -in +{ inputs, pkgs, config, ... }: { age.secrets.mint.file = ../secrets/mint.age; services = { mint = { enable = true; - inherit port; settings = { MINT_LOG_LEVEL = "INFO"; }; @@ -23,7 +14,7 @@ handle_path /static/* { root * ${inputs.mint.packages.${pkgs.stdenv.hostPlatform.system}.default}/lib/mint/static/ file_server } - reverse_proxy localhost:${builtins.toString port} + reverse_proxy localhost:6468 ''; }; } diff --git a/dragonwell/oa2p.nix b/dragonwell/oa2p.nix index c3ca8fc5a7c321e6a0f14889df6c976304abf45a..26d5e1f2bbf6446f26798b0854f8bfbccb731837 100644 --- a/dragonwell/oa2p.nix +++ b/dragonwell/oa2p.nix @@ -1,14 +1,11 @@ { config, ... }: -let - port = 6227; -in { age.secrets.oa2p.file = ../secrets/oa2p.age; services = { oauth2-proxy = { enable = true; provider = "oidc"; - httpAddress = "localhost:${builtins.toString port}"; + httpAddress = "localhost:6227"; reverseProxy = true; cookie = { secure = true; @@ -20,7 +17,7 @@ redirectURL = "https://wiki.jolheiser.com/oauth2/callback"; oidcIssuerUrl = "https://id.jolheiser.com"; }; caddy.virtualHosts."oa2p.jolheiser.com".extraConfig = '' - reverse_proxy localhost:${builtins.toString port} + reverse_proxy localhost:6227 ''; }; } diff --git a/dragonwell/pocket-id.nix b/dragonwell/pocket-id.nix index 993f938f133e2f00a3d9620852ecd155e40c4bf3..fc920a62fe44a0acd2a742534d9b76aa42631e7d 100644 --- a/dragonwell/pocket-id.nix +++ b/dragonwell/pocket-id.nix @@ -1,7 +1,4 @@ { config, ... }: -let - port = 2884; -in { age.secrets.pocket-id.file = ../secrets/pocket-id.age; services = { @@ -9,7 +6,7 @@ pocket-id = { enable = true; settings = { APP_URL = "https://id.jolheiser.com"; - PORT = port; + PORT = 2884; APP_NAME = "jolheiser ID"; EMAILS_VERIFIED = true; UI_CONFIG_DISABLED = true; @@ -19,7 +16,7 @@ }; environmentFile = config.age.secrets.pocket-id.path; }; caddy.virtualHosts."id.jolheiser.com".extraConfig = '' - reverse_proxy localhost:${builtins.toString port} + reverse_proxy localhost:2884 ''; }; } diff --git a/dragonwell/pubserve.nix b/dragonwell/pubserve.nix index 38ac37e5c5fc542ebcf381c34395888ddd10981f..10a0ee65af37d433d0b95df34b524ef2964bd46e 100644 --- a/dragonwell/pubserve.nix +++ b/dragonwell/pubserve.nix @@ -2,8 +2,6 @@ { pkgs, lib, ... }: let user = "pubserve"; path = "/var/lib/pubserve"; - pubPort = 3454; - privPort = 3455; in { users.users.${user} = { @@ -34,7 +32,7 @@ description = "Miniserve Public File Server"; after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; serviceConfig = { - ExecStart = "${pkgs.miniserve}/bin/miniserve -t 'PubServe' -p ${builtins.toString pubPort} ${lib.concatStringsSep " " commonArgs}"; + ExecStart = "${pkgs.miniserve}/bin/miniserve -t 'PubServe' -p 3454 ${lib.concatStringsSep " " commonArgs}"; Restart = "on-failure"; User = user; Group = user; @@ -45,7 +43,7 @@ description = "Miniserve Public File Server (Admin)"; after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; serviceConfig = { - ExecStart = "${pkgs.miniserve}/bin/miniserve -u -U -o 'overwrite' -t 'PrivServe' -p ${builtins.toString privPort} ${lib.concatStringsSep " " commonArgs}"; + ExecStart = "${pkgs.miniserve}/bin/miniserve -u -U -o 'overwrite' -t 'PrivServe' -p 3455 ${lib.concatStringsSep " " commonArgs}"; Restart = "on-failure"; User = user; Group = user; @@ -57,13 +55,13 @@ pubserve = { enable = true; hostname = "pubserve"; funnel = true; - port = pubPort; + port = 3454; authKey = "tskey-auth-kJrnknpMsL11CNTRL-ot1kkasErR2cLZZmfuKYR2b9za7fCzVR"; # One-time key }; privserve = { enable = true; hostname = "privserve"; - port = privPort; + port = 3455; authKey = "tskey-auth-kKFv865ykk11CNTRL-dfmxUREHP5evuuMsfPy55ehXECXrLF1N7"; # One-time key }; }; diff --git a/dragonwell/soju.nix b/dragonwell/soju.nix index 01f4534190c57cc26a4822da1f6fc62ce862ebd1..516da2fdbab2ecf64ef0fe466a2c37f395a12b25 100644 --- a/dragonwell/soju.nix +++ b/dragonwell/soju.nix @@ -1,14 +1,13 @@ { lib, ... }: let baseCertPath = "/var/lib/acme/irc.jolheiser.com"; - port = 7658; in { security.acme = { acceptTerms = true; email = "irc@jolheiser.com"; certs."irc.jolheiser.com" = { - listenHTTP = ":${builtins.toString port}"; + listenHTTP = ":7658"; postRun = "systemctl reload soju"; group = "soju"; }; @@ -20,7 +19,7 @@ tlsCertificate = "${baseCertPath}/fullchain.pem"; tlsCertificateKey = "${baseCertPath}/key.pem"; }; caddy.virtualHosts."irc.jolheiser.com".extraConfig = '' - reverse_proxy localhost:${builtins.toString port} + reverse_proxy localhost:7658 ''; }; systemd.services.soju.serviceConfig = { diff --git a/dragonwell/ugit.nix b/dragonwell/ugit.nix index c985c6e38fe0d2e9ef06a78e13d7fd144cea74d4..ab8f48cbf5947271b73ee6b07ba6b7f654807ff5 100644 --- a/dragonwell/ugit.nix +++ b/dragonwell/ugit.nix @@ -1,7 +1,5 @@ { lib, ... }: let - pubPort = 8449; - privPort = 8447; opts = let homeDir = "/var/lib/ugit"; @@ -18,10 +16,7 @@ user = "ugit"; group = "ugit"; config = { ssh.clone-url = "ugit@git.jolheiser.com"; - http = { - port = pubPort; - clone-url = "https://git.jolheiser.com"; - }; + http.clone-url = "https://git.jolheiser.com"; log.json = true; profile = { username = "jolheiser"; @@ -42,7 +37,7 @@ public = opts; private = lib.recursiveUpdate opts { config = { ssh.port = 8446; - http.port = privPort; + http.port = 8447; show-private = true; }; }; @@ -50,11 +45,11 @@ }; tailproxy.ugit = { enable = true; hostname = "git"; - port = privPort; + port = 8447; authKey = "tskey-auth-kyuvaLt8pb11CNTRL-admMYrs6UWb5XaCcdWJAWbriZ6JMo7ksK"; # One-time key }; caddy.virtualHosts."git.jolheiser.com".extraConfig = '' - reverse_proxy localhost:${builtins.toString pubPort} + reverse_proxy localhost:8449 ''; }; } diff --git a/dragonwell/woodpecker.nix b/dragonwell/woodpecker.nix index 492498d7f1c0525eef4903c1c8eb1dc1b00238fb..88acd1ca4b738761aff970838cd22d2f87dcca26 100644 --- a/dragonwell/woodpecker.nix +++ b/dragonwell/woodpecker.nix @@ -4,9 +4,6 @@ pkgs, config, ... }: -let - port = 2423; -in { age.secrets.woodpecker.file = ../secrets/woodpecker.age; services = { @@ -19,7 +16,7 @@ WOODPECKER_ADDON_FORGE = "${pkgs.lib.getExe inputs.gitpecker.packages.${pkgs.stdenv.hostPlatform.system}.default }"; WOODPECKER_ADMIN = "jolheiser"; - WOODPECKER_SERVER_ADDR = ":${builtins.toString port}"; + WOODPECKER_SERVER_ADDR = ":2423"; GITPECKER_REPOS = "/var/lib/ugit/repos"; GITPECKER_URL = "https://git.jolheiser.com"; @@ -49,7 +46,7 @@ }; tailproxy.woodpecker = { enable = true; hostname = "cicd"; - inherit port; + port = 2423; authKey = "tskey-auth-kgrGNGArZw11CNTRL-rA3rdahB1dEobvWZraPhcEpHp2BVBcYh"; # One-time key }; };