diff --git a/nixos/modules/networking/netns/common.nix b/nixos/modules/networking/netns/common.nix index 9380d7e..00fed15 100644 --- a/nixos/modules/networking/netns/common.nix +++ b/nixos/modules/networking/netns/common.nix @@ -7,7 +7,7 @@ with lib; let allNetns = config.networking.netns; - nonDefaultNetns = filterAttrs (name: _cfg: name != "default") allNetns; + nonDefaultNetns = filterAttrs (name: _cfg: name != "init") allNetns; in { options.networking.netns = mkOption { @@ -18,7 +18,7 @@ in options = { netnsPath = mkOption { type = types.str; - default = if name == "default" then "/proc/1/ns/net" else "/run/netns/${name}"; + default = if name == "init" then "/proc/1/ns/net" else "/run/netns/${name}"; readOnly = true; description = '' Path to the network namespace. @@ -62,7 +62,7 @@ in }; config = { - networking.netns.default = { }; + networking.netns.init = { }; systemd.services = mapAttrs' ( name: cfg: diff --git a/nixos/modules/networking/netns/mntns.nix b/nixos/modules/networking/netns/mntns.nix index e8c3f7c..871491d 100644 --- a/nixos/modules/networking/netns/mntns.nix +++ b/nixos/modules/networking/netns/mntns.nix @@ -7,7 +7,7 @@ with lib; let allNetns = config.networking.netns; - nonDefaultNetns = filterAttrs (name: _cfg: name != "default") allNetns; + nonDefaultNetns = filterAttrs (name: _cfg: name != "init") allNetns; in { options.networking.netns = mkOption { @@ -18,7 +18,7 @@ in options = { mntnsPath = mkOption { type = types.str; - default = if name == "default" then "/proc/1/ns/mnt" else "/run/${name}/mntns/${name}"; + default = if name == "init" then "/proc/1/ns/mnt" else "/run/${name}/mntns/${name}"; readOnly = true; description = '' Path to the auxiliary mount namespace. @@ -40,7 +40,7 @@ in hostPath = mkOption { type = types.str; description = '' - Location of the path to be mounted in the default mount namespace. + Location of the path to be mounted in the init mount namespace. ''; }; isReadOnly = mkOption { @@ -62,7 +62,7 @@ in serviceConfig = mkOption { type = types.attrs; default = - if name == "default" then + if name == "init" then { } else let diff --git a/nixos/modules/networking/netns/nftables.nix b/nixos/modules/networking/netns/nftables.nix index ded471a..84ad5ab 100644 --- a/nixos/modules/networking/netns/nftables.nix +++ b/nixos/modules/networking/netns/nftables.nix @@ -7,7 +7,7 @@ with lib; let allNetns = config.networking.netns; - nftablesEnabledNetns = filterAttrs (name: cfg: name != "default" && cfg.nftables.enable) allNetns; + nftablesEnabledNetns = filterAttrs (name: cfg: name != "init" && cfg.nftables.enable) allNetns; in { options.networking.netns = mkOption { diff --git a/nixos/modules/networking/netns/nscd.nix b/nixos/modules/networking/netns/nscd.nix index b78ee16..a4a9eae 100644 --- a/nixos/modules/networking/netns/nscd.nix +++ b/nixos/modules/networking/netns/nscd.nix @@ -8,7 +8,7 @@ with lib; let allNetns = config.networking.netns; - dnsIsolatedNetns = filterAttrs (name: cfg: name != "default" && cfg.enableDNSIsolation) allNetns; + dnsIsolatedNetns = filterAttrs (name: cfg: name != "init" && cfg.enableDNSIsolation) allNetns; in { options.networking.netns = mkOption { diff --git a/nixos/modules/networking/netns/port-forward.nix b/nixos/modules/networking/netns/port-forward.nix index c955bda..86c4eb7 100644 --- a/nixos/modules/networking/netns/port-forward.nix +++ b/nixos/modules/networking/netns/port-forward.nix @@ -31,7 +31,7 @@ in }; netns = mkOption { type = types.str; - default = "default"; + default = "init"; description = '' The network namespace to forward ports from. ''; @@ -78,7 +78,7 @@ in ; netnsPath = config.networking.netns.${netns}.netnsPath; serviceDeps = map (ns: "netns-${ns}.service") ( - filter (ns: ns != "default") [ + filter (ns: ns != "init") [ name netns ] diff --git a/nixos/modules/services/enthalpy/gost.nix b/nixos/modules/services/enthalpy/gost.nix index fa9f21c..a409bf2 100644 --- a/nixos/modules/services/enthalpy/gost.nix +++ b/nixos/modules/services/enthalpy/gost.nix @@ -35,7 +35,7 @@ in networking.netns.enthalpy.forwardPorts = singleton { protocol = "tcp"; - netns = "default"; + netns = "init"; source = "[::1]:${toString config.networking.ports.enthalpy-gost}"; target = "[::1]:${toString config.networking.ports.socks}"; }; diff --git a/nixos/profiles/services/enthalpy/common.nix b/nixos/profiles/services/enthalpy/common.nix index 474b615..2476960 100644 --- a/nixos/profiles/services/enthalpy/common.nix +++ b/nixos/profiles/services/enthalpy/common.nix @@ -42,7 +42,7 @@ networking.netns.enthalpy.forwardPorts = lib.optionals config.services.openssh.enable [ { protocol = "tcp"; - netns = "default"; + netns = "init"; source = "[::]:${toString config.networking.ports.ssh}"; target = "[::]:${toString config.networking.ports.ssh}"; } diff --git a/nixos/profiles/services/prometheus/ping-exporter.nix b/nixos/profiles/services/prometheus/ping-exporter.nix index 43f5217..d575742 100644 --- a/nixos/profiles/services/prometheus/ping-exporter.nix +++ b/nixos/profiles/services/prometheus/ping-exporter.nix @@ -26,7 +26,7 @@ in wantedBy = [ "netns-enthalpy.service" ]; }; - networking.netns.default.forwardPorts = lib.singleton { + networking.netns.init.forwardPorts = lib.singleton { protocol = "tcp"; netns = "enthalpy"; source = "127.0.0.1:${toString config.networking.ports.prometheus-ping-exporter}";