mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 14:01:34 +01:00
meta/ports: Rename list options
This commit is contained in:
parent
250e2ea3d0
commit
3fd0e85151
24 changed files with 29 additions and 29 deletions
|
|
@ -10,11 +10,11 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.meta.ports = {
|
options.meta.ports = {
|
||||||
tcp.list = lib.mkOption {
|
tcp = lib.mkOption {
|
||||||
type = lib.types.listOf lib.types.port;
|
type = lib.types.listOf lib.types.port;
|
||||||
default = [ ];
|
default = [ ];
|
||||||
};
|
};
|
||||||
udp.list = lib.mkOption {
|
udp = lib.mkOption {
|
||||||
type = lib.types.listOf lib.types.port;
|
type = lib.types.listOf lib.types.port;
|
||||||
default = [ ];
|
default = [ ];
|
||||||
};
|
};
|
||||||
|
|
@ -26,7 +26,7 @@ in
|
||||||
let
|
let
|
||||||
findDuplicatePorts =
|
findDuplicatePorts =
|
||||||
protocol:
|
protocol:
|
||||||
options.meta.ports.${protocol}.list.definitionsWithLocations
|
options.meta.ports.${protocol}.definitionsWithLocations
|
||||||
|> lib.concatMap (
|
|> lib.concatMap (
|
||||||
{ file, value }:
|
{ file, value }:
|
||||||
value
|
value
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ in
|
||||||
message = "Each caddy virtual host must set exactly one of `port` or `files`";
|
message = "Each caddy virtual host must set exactly one of `port` or `files`";
|
||||||
};
|
};
|
||||||
|
|
||||||
meta.ports.tcp.list = [ cfg.metricsPort ];
|
meta.ports.tcp = [ cfg.metricsPort ];
|
||||||
|
|
||||||
services.caddy = {
|
services.caddy = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -99,7 +99,7 @@ in
|
||||||
}
|
}
|
||||||
|
|
||||||
(lib.mkIf publicHostsExist {
|
(lib.mkIf publicHostsExist {
|
||||||
meta.ports.tcp.list = webPorts;
|
meta.ports.tcp = webPorts;
|
||||||
networking.firewall.allowedTCPPorts = webPorts;
|
networking.firewall.allowedTCPPorts = webPorts;
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
meta.ports.tcp.list = [
|
meta.ports.tcp = [
|
||||||
cfg.apiPort
|
cfg.apiPort
|
||||||
cfg.prometheusPort
|
cfg.prometheusPort
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,8 @@ in
|
||||||
|
|
||||||
config = lib.mkIf config.custom.services.resolved.enable {
|
config = lib.mkIf config.custom.services.resolved.enable {
|
||||||
meta.ports = {
|
meta.ports = {
|
||||||
tcp.list = ports;
|
tcp = ports;
|
||||||
udp.list = ports;
|
udp = ports;
|
||||||
};
|
};
|
||||||
|
|
||||||
services.resolved = {
|
services.resolved = {
|
||||||
|
|
|
||||||
|
|
@ -56,11 +56,11 @@ in
|
||||||
meta = {
|
meta = {
|
||||||
domains.local = lib.mkIf (cfg.gui.domain != null) [ cfg.gui.domain ];
|
domains.local = lib.mkIf (cfg.gui.domain != null) [ cfg.gui.domain ];
|
||||||
ports = {
|
ports = {
|
||||||
tcp.list = [
|
tcp = [
|
||||||
cfg.syncPort
|
cfg.syncPort
|
||||||
cfg.gui.port
|
cfg.gui.port
|
||||||
];
|
];
|
||||||
udp.list = [ cfg.syncPort ];
|
udp = [ cfg.syncPort ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
meta.ports.udp.list = lib.mkIf config.services.tailscale.openFirewall [
|
meta.ports.udp = lib.mkIf config.services.tailscale.openFirewall [
|
||||||
config.services.tailscale.port
|
config.services.tailscale.port
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ in
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
meta = {
|
meta = {
|
||||||
domains.local = [ cfg.domain ];
|
domains.local = [ cfg.domain ];
|
||||||
ports.tcp.list = [ cfg.port ];
|
ports.tcp = [ cfg.port ];
|
||||||
};
|
};
|
||||||
|
|
||||||
users = {
|
users = {
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ in
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
domains.local = [ cfg.domain ];
|
domains.local = [ cfg.domain ];
|
||||||
ports.tcp.list = [ cfg.port ];
|
ports.tcp = [ cfg.port ];
|
||||||
};
|
};
|
||||||
|
|
||||||
services.alloy = {
|
services.alloy = {
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ in
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
domains.local = [ cfg.domain ];
|
domains.local = [ cfg.domain ];
|
||||||
ports.tcp.list = [ cfg.port ];
|
ports.tcp = [ cfg.port ];
|
||||||
};
|
};
|
||||||
|
|
||||||
services.filebrowser = {
|
services.filebrowser = {
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ in
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
domains.local = [ cfg.domain ];
|
domains.local = [ cfg.domain ];
|
||||||
ports.tcp.list = [ cfg.port ];
|
ports.tcp = [ cfg.port ];
|
||||||
};
|
};
|
||||||
|
|
||||||
sops.secrets."forgejo/admin-password" = {
|
sops.secrets."forgejo/admin-password" = {
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
meta.ports.tcp.list = [ cfg.port ];
|
meta.ports.tcp = [ cfg.port ];
|
||||||
|
|
||||||
services.forgejo.settings.server.SSH_PORT = cfg.port;
|
services.forgejo.settings.server.SSH_PORT = cfg.port;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ in
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
domains.local = [ cfg.domain ];
|
domains.local = [ cfg.domain ];
|
||||||
ports.tcp.list = [ cfg.port ];
|
ports.tcp = [ cfg.port ];
|
||||||
};
|
};
|
||||||
|
|
||||||
services.freshrss = {
|
services.freshrss = {
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ in
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
domains.local = [ cfg.domain ];
|
domains.local = [ cfg.domain ];
|
||||||
ports.tcp.list = [ cfg.port ];
|
ports.tcp = [ cfg.port ];
|
||||||
};
|
};
|
||||||
|
|
||||||
sops = {
|
sops = {
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ in
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
meta = {
|
meta = {
|
||||||
domains.local = [ cfg.domain ];
|
domains.local = [ cfg.domain ];
|
||||||
ports.tcp.list = [ cfg.port ];
|
ports.tcp = [ cfg.port ];
|
||||||
};
|
};
|
||||||
|
|
||||||
sops.secrets."grafana/admin-password" = {
|
sops.secrets."grafana/admin-password" = {
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ in
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
domains.local = [ cfg.domain ];
|
domains.local = [ cfg.domain ];
|
||||||
ports.tcp.list = [ cfg.port ];
|
ports.tcp = [ cfg.port ];
|
||||||
};
|
};
|
||||||
|
|
||||||
services.memos = {
|
services.memos = {
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ in
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
meta = {
|
meta = {
|
||||||
domains.local = [ cfg.domain ];
|
domains.local = [ cfg.domain ];
|
||||||
ports.tcp.list = [ cfg.port ];
|
ports.tcp = [ cfg.port ];
|
||||||
};
|
};
|
||||||
|
|
||||||
services.ntfy-sh = {
|
services.ntfy-sh = {
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ in
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
meta = {
|
meta = {
|
||||||
domains.local = [ cfg.domain ];
|
domains.local = [ cfg.domain ];
|
||||||
ports.tcp.list = [ cfg.port ];
|
ports.tcp = [ cfg.port ];
|
||||||
};
|
};
|
||||||
|
|
||||||
virtualisation.oci-containers.containers.openspeedtest = {
|
virtualisation.oci-containers.containers.openspeedtest = {
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ in
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
meta = {
|
meta = {
|
||||||
domains.local = [ cfg.domain ];
|
domains.local = [ cfg.domain ];
|
||||||
ports.tcp.list = [ cfg.port ];
|
ports.tcp = [ cfg.port ];
|
||||||
};
|
};
|
||||||
|
|
||||||
sops.secrets."outline/gitlab-auth-secret" = {
|
sops.secrets."outline/gitlab-auth-secret" = {
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ in
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
domains.local = [ cfg.domain ];
|
domains.local = [ cfg.domain ];
|
||||||
ports.tcp.list = [ cfg.port ];
|
ports.tcp = [ cfg.port ];
|
||||||
};
|
};
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ in
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
meta = {
|
meta = {
|
||||||
domains.local = [ cfg.domain ];
|
domains.local = [ cfg.domain ];
|
||||||
ports.tcp.list = [ cfg.port ];
|
ports.tcp = [ cfg.port ];
|
||||||
};
|
};
|
||||||
|
|
||||||
sops.secrets."radicale/htpasswd" = {
|
sops.secrets."radicale/htpasswd" = {
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ in
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
meta = {
|
meta = {
|
||||||
domains.local = [ cfg.domain ];
|
domains.local = [ cfg.domain ];
|
||||||
ports.tcp.list = [ cfg.port ];
|
ports.tcp = [ cfg.port ];
|
||||||
};
|
};
|
||||||
|
|
||||||
services.stirling-pdf = {
|
services.stirling-pdf = {
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ in
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
meta = {
|
meta = {
|
||||||
domains.local = [ cfg.domain ];
|
domains.local = [ cfg.domain ];
|
||||||
ports.tcp.list = [ cfg.port ];
|
ports.tcp = [ cfg.port ];
|
||||||
};
|
};
|
||||||
|
|
||||||
services.uptime-kuma = {
|
services.uptime-kuma = {
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ in
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
domains.local = [ cfg.domain ];
|
domains.local = [ cfg.domain ];
|
||||||
ports.tcp.list = [ cfg.port ];
|
ports.tcp = [ cfg.port ];
|
||||||
};
|
};
|
||||||
|
|
||||||
users = {
|
users = {
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ in
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
domains.local = [ cfg.domain ];
|
domains.local = [ cfg.domain ];
|
||||||
ports.tcp.list = [ cfg.port ];
|
ports.tcp = [ cfg.port ];
|
||||||
};
|
};
|
||||||
|
|
||||||
users = {
|
users = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue