refactor: store port as integer
This commit is contained in:
parent
0f2801f823
commit
4502e197bf
19 changed files with 64 additions and 93 deletions
|
|
@ -2,12 +2,11 @@
|
|||
# keep-sorted start
|
||||
config,
|
||||
inputs,
|
||||
lib,
|
||||
# keep-sorted end
|
||||
...
|
||||
}:
|
||||
let
|
||||
port = "5000";
|
||||
port = 5000;
|
||||
in
|
||||
{
|
||||
imports = [ inputs.copyparty.nixosModules.default ];
|
||||
|
|
@ -20,7 +19,7 @@ in
|
|||
e2dsa = true;
|
||||
e2ts = true;
|
||||
e2vu = true;
|
||||
p = lib.toInt port;
|
||||
p = port;
|
||||
};
|
||||
|
||||
accounts.will.passwordFile = config.age.secrets.copyparty-will.path;
|
||||
|
|
@ -37,7 +36,7 @@ in
|
|||
nginx.virtualHosts."copyparty.fi33.buzz" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = "fi33.buzz";
|
||||
locations."/".proxyPass = "http://localhost:${port}";
|
||||
locations."/".proxyPass = "http://localhost:${toString port}";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,5 @@
|
|||
{
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
port = "5984";
|
||||
port = 5984;
|
||||
in
|
||||
{
|
||||
services = {
|
||||
|
|
@ -12,7 +8,7 @@ in
|
|||
databaseDir = "/srv/couchdb";
|
||||
viewIndexDir = "/srv/couchdb";
|
||||
configFile = "/srv/couchdb";
|
||||
port = lib.toInt port;
|
||||
inherit port;
|
||||
extraConfig = {
|
||||
chttpd = {
|
||||
require_valid_user = true;
|
||||
|
|
@ -41,7 +37,7 @@ in
|
|||
nginx.virtualHosts."couchdb.fi33.buzz" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = "fi33.buzz";
|
||||
locations."/".proxyPass = "http://localhost:${port}";
|
||||
locations."/".proxyPass = "http://localhost:${toString port}";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,21 +1,17 @@
|
|||
{
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
port = "5011";
|
||||
port = 5011;
|
||||
in
|
||||
{
|
||||
services = {
|
||||
flaresolverr = {
|
||||
enable = true;
|
||||
port = lib.toInt port;
|
||||
inherit port;
|
||||
};
|
||||
|
||||
nginx.virtualHosts."flaresolverr.fi33.buzz" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = "fi33.buzz";
|
||||
locations."/".proxyPass = "http://localhost:${port}";
|
||||
locations."/".proxyPass = "http://localhost:${toString port}";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
...
|
||||
}:
|
||||
let
|
||||
port = "5004";
|
||||
port = 5004;
|
||||
genSecrets =
|
||||
secrets:
|
||||
lib.genAttrs secrets (secret: {
|
||||
|
|
@ -38,7 +38,7 @@ in
|
|||
services = {
|
||||
homepage-dashboard = {
|
||||
enable = true;
|
||||
listenPort = lib.toInt port;
|
||||
listenPort = port;
|
||||
allowedHosts = "homepage-dashboard.fi33.buzz";
|
||||
services = [
|
||||
# keep-sorted start block=yes
|
||||
|
|
@ -300,7 +300,7 @@ in
|
|||
nginx.virtualHosts."homepage-dashboard.fi33.buzz" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = "fi33.buzz";
|
||||
locations."/".proxyPass = "http://localhost:${port}";
|
||||
locations."/".proxyPass = "http://localhost:${toString port}";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,15 +1,11 @@
|
|||
{
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
port = "2283";
|
||||
port = 2283;
|
||||
in
|
||||
{
|
||||
services = {
|
||||
immich = {
|
||||
enable = true;
|
||||
port = lib.toInt "${port}";
|
||||
inherit port;
|
||||
mediaLocation = "/srv/immich";
|
||||
};
|
||||
|
||||
|
|
@ -28,7 +24,7 @@ in
|
|||
forceSSL = true;
|
||||
useACMEHost = "fi33.buzz";
|
||||
locations."/" = {
|
||||
proxyPass = "http://[::1]:${port}";
|
||||
proxyPass = "http://[::1]:${toString port}";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
let
|
||||
port = "8096";
|
||||
port = 8096;
|
||||
in
|
||||
{
|
||||
services = {
|
||||
|
|
@ -12,7 +12,7 @@ in
|
|||
nginx.virtualHosts."jellyfin.fi33.buzz" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = "fi33.buzz";
|
||||
locations."/".proxyPass = "http://localhost:${port}";
|
||||
locations."/".proxyPass = "http://localhost:${toString port}";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
let
|
||||
port = "5014";
|
||||
port = 5014;
|
||||
in
|
||||
{
|
||||
services = {
|
||||
karakeep = {
|
||||
enable = true;
|
||||
extraEnvironment = {
|
||||
PORT = port;
|
||||
PORT = toString port;
|
||||
DISABLE_NEW_RELEASE_CHECK = "true";
|
||||
};
|
||||
};
|
||||
|
|
@ -14,7 +14,7 @@ in
|
|||
nginx.virtualHosts."karakeep.fi33.buzz" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = "fi33.buzz";
|
||||
locations."/".proxyPass = "http://localhost:${port}";
|
||||
locations."/".proxyPass = "http://localhost:${toString port}";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,23 +1,21 @@
|
|||
{
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
port = "5012";
|
||||
port = 5012;
|
||||
in
|
||||
{
|
||||
services = {
|
||||
lidarr = {
|
||||
enable = true;
|
||||
dataDir = "/srv/lidarr";
|
||||
settings.server.port = lib.toInt port;
|
||||
settings.server = {
|
||||
inherit port;
|
||||
};
|
||||
group = "media";
|
||||
};
|
||||
|
||||
nginx.virtualHosts."lidarr.fi33.buzz" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = "fi33.buzz";
|
||||
locations."/".proxyPass = "http://localhost:${port}";
|
||||
locations."/".proxyPass = "http://localhost:${toString port}";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
...
|
||||
}:
|
||||
let
|
||||
port = "5010";
|
||||
port = 5010;
|
||||
in
|
||||
{
|
||||
services = {
|
||||
|
|
@ -12,7 +12,7 @@ in
|
|||
adminCredentialsFile = config.age.secrets.miniflux-creds.path;
|
||||
config = {
|
||||
BASE_URL = "https://miniflux.fi33.buzz";
|
||||
LISTEN_ADDR = "localhost:${port}";
|
||||
LISTEN_ADDR = "localhost:${toString port}";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -28,7 +28,7 @@ in
|
|||
nginx.virtualHosts."miniflux.fi33.buzz" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = "fi33.buzz";
|
||||
locations."/".proxyPass = "http://localhost:${port}";
|
||||
locations."/".proxyPass = "http://localhost:${toString port}";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
let
|
||||
port = "5002";
|
||||
port = 5002;
|
||||
in
|
||||
{
|
||||
services = {
|
||||
|
|
@ -7,7 +7,7 @@ in
|
|||
enable = true;
|
||||
settings = {
|
||||
base-url = "https://ntfy-sh.fi33.buzz";
|
||||
listen-http = ":${port}";
|
||||
listen-http = ":${toString port}";
|
||||
behind-proxy = true;
|
||||
};
|
||||
};
|
||||
|
|
@ -16,7 +16,7 @@ in
|
|||
forceSSL = true;
|
||||
useACMEHost = "fi33.buzz";
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:${port}";
|
||||
proxyPass = "http://localhost:${toString port}";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
port = "5013";
|
||||
port = 5013;
|
||||
in
|
||||
{
|
||||
services = {
|
||||
|
|
@ -13,7 +12,7 @@ in
|
|||
dataDir = "/srv/paperless";
|
||||
database.createLocally = true;
|
||||
passwordFile = config.age.secrets.paperless.path;
|
||||
port = lib.toInt port;
|
||||
inherit port;
|
||||
settings = {
|
||||
PAPERLESS_URL = "https://paperless.fi33.buzz";
|
||||
};
|
||||
|
|
@ -33,7 +32,7 @@ in
|
|||
nginx.virtualHosts."paperless.fi33.buzz" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = "fi33.buzz";
|
||||
locations."/".proxyPass = "http://localhost:${port}";
|
||||
locations."/".proxyPass = "http://localhost:${toString port}";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,26 +1,21 @@
|
|||
{
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
port = "5009";
|
||||
port = 5009;
|
||||
in
|
||||
{
|
||||
services = {
|
||||
prowlarr = {
|
||||
enable = true;
|
||||
dataDir = "/srv/prowlarr";
|
||||
settings.server.port = lib.toInt port;
|
||||
settings.server = {
|
||||
inherit port;
|
||||
};
|
||||
};
|
||||
|
||||
nginx = {
|
||||
virtualHosts."prowlarr.fi33.buzz" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = "fi33.buzz";
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:${port}";
|
||||
# proxyWebsockets = true;
|
||||
};
|
||||
locations."/".proxyPass = "http://localhost:${toString port}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,15 +1,11 @@
|
|||
{
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
port = "5005";
|
||||
port = 5005;
|
||||
in
|
||||
{
|
||||
services = {
|
||||
qbittorrent = {
|
||||
enable = true;
|
||||
webuiPort = lib.toInt port;
|
||||
webuiPort = port;
|
||||
profileDir = "/srv";
|
||||
group = "media";
|
||||
extraArgs = [
|
||||
|
|
@ -20,7 +16,7 @@ in
|
|||
nginx.virtualHosts."qbittorrent.fi33.buzz" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = "fi33.buzz";
|
||||
locations."/".proxyPass = "http://localhost:${port}";
|
||||
locations."/".proxyPass = "http://localhost:${toString port}";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,23 +1,21 @@
|
|||
{
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
port = "5007";
|
||||
port = 5007;
|
||||
in
|
||||
{
|
||||
services = {
|
||||
radarr = {
|
||||
enable = true;
|
||||
dataDir = "/srv/radarr";
|
||||
settings.server.port = lib.toInt port;
|
||||
settings.server = {
|
||||
inherit port;
|
||||
};
|
||||
group = "media";
|
||||
};
|
||||
|
||||
nginx.virtualHosts."radarr.fi33.buzz" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = "fi33.buzz";
|
||||
locations."/".proxyPass = "http://localhost:${port}";
|
||||
locations."/".proxyPass = "http://localhost:${toString port}";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
...
|
||||
}:
|
||||
let
|
||||
port = "5003";
|
||||
port = 5003;
|
||||
in
|
||||
{
|
||||
services = {
|
||||
|
|
@ -12,8 +12,8 @@ in
|
|||
settings = {
|
||||
server = {
|
||||
hosts = [
|
||||
"0.0.0.0:${port}"
|
||||
"[::]:${port}"
|
||||
"0.0.0.0:${toString port}"
|
||||
"[::]:${toString port}"
|
||||
];
|
||||
};
|
||||
auth = {
|
||||
|
|
@ -30,7 +30,7 @@ in
|
|||
nginx.virtualHosts."radicale.fi33.buzz" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = "fi33.buzz";
|
||||
locations."/".proxyPass = "http://localhost:${port}";
|
||||
locations."/".proxyPass = "http://localhost:${toString port}";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,23 +1,21 @@
|
|||
{
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
port = "5006";
|
||||
port = 5006;
|
||||
in
|
||||
{
|
||||
services = {
|
||||
sonarr = {
|
||||
enable = true;
|
||||
dataDir = "/srv/sonarr";
|
||||
settings.server.port = lib.toInt port;
|
||||
settings.server = {
|
||||
inherit port;
|
||||
};
|
||||
group = "media";
|
||||
};
|
||||
|
||||
nginx.virtualHosts."sonarr.fi33.buzz" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = "fi33.buzz";
|
||||
locations."/".proxyPass = "http://localhost:${port}";
|
||||
locations."/".proxyPass = "http://localhost:${toString port}";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
...
|
||||
}:
|
||||
let
|
||||
port = "5008";
|
||||
port = 5008;
|
||||
devicesList = [
|
||||
# keep-sorted start block=yes
|
||||
{
|
||||
|
|
@ -45,7 +45,7 @@ in
|
|||
services = {
|
||||
syncthing = {
|
||||
enable = true;
|
||||
guiAddress = "0.0.0.0:${port}";
|
||||
guiAddress = "0.0.0.0:${toString port}";
|
||||
openDefaultPorts = true;
|
||||
user = "${userName}";
|
||||
dataDir = "/home/${userName}";
|
||||
|
|
@ -69,7 +69,7 @@ in
|
|||
nginx.virtualHosts."syncthing.fi33.buzz" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = "fi33.buzz";
|
||||
locations."/".proxyPass = "http://localhost:${port}";
|
||||
locations."/".proxyPass = "http://localhost:${toString port}";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
...
|
||||
}:
|
||||
let
|
||||
port = "5001";
|
||||
port = 5001;
|
||||
in
|
||||
{
|
||||
services = {
|
||||
|
|
@ -11,7 +11,7 @@ in
|
|||
enable = true;
|
||||
backupDir = "/srv/vaultwarden";
|
||||
config = {
|
||||
rocketPort = "${port}";
|
||||
rocketPort = toString port;
|
||||
domain = "https://vaultwarden.fi33.buzz";
|
||||
signupsAllowed = false;
|
||||
invitationsAllowed = false;
|
||||
|
|
@ -26,7 +26,7 @@ in
|
|||
forceSSL = true;
|
||||
useACMEHost = "fi33.buzz";
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:${port}";
|
||||
proxyPass = "http://localhost:${toString port}";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue