From 5e6a83bb661356e3a0344e792dcdcbeab917fe04 Mon Sep 17 00:00:00 2001 From: Lu Wang Date: Mon, 2 Dec 2024 14:36:13 +0800 Subject: [PATCH] services/enthalpy: resolve collision of `RuntimeDirectory` entries --- nixos/modules/services/enthalpy/bird.nix | 4 ++-- nixos/modules/services/enthalpy/clat.nix | 1 - nixos/modules/services/enthalpy/gost.nix | 1 - nixos/modules/services/enthalpy/nat64.nix | 1 - 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/nixos/modules/services/enthalpy/bird.nix b/nixos/modules/services/enthalpy/bird.nix index d42416f..c93294d 100644 --- a/nixos/modules/services/enthalpy/bird.nix +++ b/nixos/modules/services/enthalpy/bird.nix @@ -15,7 +15,7 @@ in enable = mkEnableOption "bird for site-scope connectivity"; socket = mkOption { type = types.str; - default = "/run/enthalpy/bird.ctl"; + default = "/run/enthalpy/bird2/bird.ctl"; description = '' Path to the bird control socket. ''; @@ -57,7 +57,7 @@ in Restart = "on-failure"; RestartSec = 5; DynamicUser = true; - RuntimeDirectory = "enthalpy"; + RuntimeDirectory = "enthalpy/bird2"; ExecStart = "${pkgs.bird}/bin/bird -s ${cfg.bird.socket} -c /etc/enthalpy/bird2.conf"; ExecReload = "${pkgs.bird}/bin/birdc -s ${cfg.bird.socket} configure"; ExecStop = "${pkgs.bird}/bin/birdc -s ${cfg.bird.socket} down"; diff --git a/nixos/modules/services/enthalpy/clat.nix b/nixos/modules/services/enthalpy/clat.nix index 184b4fc..d2483fc 100644 --- a/nixos/modules/services/enthalpy/clat.nix +++ b/nixos/modules/services/enthalpy/clat.nix @@ -63,7 +63,6 @@ in Restart = "on-failure"; RestartSec = 5; DynamicUser = true; - RuntimeDirectory = "enthalpy"; CapabilityBoundingSet = [ "CAP_NET_ADMIN" ]; AmbientCapabilities = [ "CAP_NET_ADMIN" ]; ProtectSystem = "full"; diff --git a/nixos/modules/services/enthalpy/gost.nix b/nixos/modules/services/enthalpy/gost.nix index 43fb13e..9ad2a5c 100644 --- a/nixos/modules/services/enthalpy/gost.nix +++ b/nixos/modules/services/enthalpy/gost.nix @@ -27,7 +27,6 @@ in Restart = "on-failure"; RestartSec = 5; DynamicUser = true; - RuntimeDirectory = "enthalpy"; ExecStart = "${pkgs.gost}/bin/gost -L=socks5://[fc00::]:${toString config.networking.ports.enthalpy-gost}"; ProtectSystem = "full"; ProtectHome = "yes"; diff --git a/nixos/modules/services/enthalpy/nat64.nix b/nixos/modules/services/enthalpy/nat64.nix index 07d658f..27301b8 100644 --- a/nixos/modules/services/enthalpy/nat64.nix +++ b/nixos/modules/services/enthalpy/nat64.nix @@ -64,7 +64,6 @@ in Restart = "on-failure"; RestartSec = 5; DynamicUser = true; - RuntimeDirectory = "enthalpy"; ExecStart = "${pkgs.tayga}/bin/tayga --config ${pkgs.writeText "tayga.conf" '' tun-device nat64 ipv6-addr fc00::