services/enthalpy: resolve collision of RuntimeDirectory entries

This commit is contained in:
Lu Wang 2024-12-02 14:36:13 +08:00
parent 6308269e6c
commit 5e6a83bb66
Signed by: rebmit
SSH key fingerprint: SHA256:3px8QV1zEerIrEWHaqtH5rR9kjetyRST5EipOPrd+bU
4 changed files with 2 additions and 5 deletions

View file

@ -15,7 +15,7 @@ in
enable = mkEnableOption "bird for site-scope connectivity"; enable = mkEnableOption "bird for site-scope connectivity";
socket = mkOption { socket = mkOption {
type = types.str; type = types.str;
default = "/run/enthalpy/bird.ctl"; default = "/run/enthalpy/bird2/bird.ctl";
description = '' description = ''
Path to the bird control socket. Path to the bird control socket.
''; '';
@ -57,7 +57,7 @@ in
Restart = "on-failure"; Restart = "on-failure";
RestartSec = 5; RestartSec = 5;
DynamicUser = true; DynamicUser = true;
RuntimeDirectory = "enthalpy"; RuntimeDirectory = "enthalpy/bird2";
ExecStart = "${pkgs.bird}/bin/bird -s ${cfg.bird.socket} -c /etc/enthalpy/bird2.conf"; ExecStart = "${pkgs.bird}/bin/bird -s ${cfg.bird.socket} -c /etc/enthalpy/bird2.conf";
ExecReload = "${pkgs.bird}/bin/birdc -s ${cfg.bird.socket} configure"; ExecReload = "${pkgs.bird}/bin/birdc -s ${cfg.bird.socket} configure";
ExecStop = "${pkgs.bird}/bin/birdc -s ${cfg.bird.socket} down"; ExecStop = "${pkgs.bird}/bin/birdc -s ${cfg.bird.socket} down";

View file

@ -63,7 +63,6 @@ in
Restart = "on-failure"; Restart = "on-failure";
RestartSec = 5; RestartSec = 5;
DynamicUser = true; DynamicUser = true;
RuntimeDirectory = "enthalpy";
CapabilityBoundingSet = [ "CAP_NET_ADMIN" ]; CapabilityBoundingSet = [ "CAP_NET_ADMIN" ];
AmbientCapabilities = [ "CAP_NET_ADMIN" ]; AmbientCapabilities = [ "CAP_NET_ADMIN" ];
ProtectSystem = "full"; ProtectSystem = "full";

View file

@ -27,7 +27,6 @@ in
Restart = "on-failure"; Restart = "on-failure";
RestartSec = 5; RestartSec = 5;
DynamicUser = true; DynamicUser = true;
RuntimeDirectory = "enthalpy";
ExecStart = "${pkgs.gost}/bin/gost -L=socks5://[fc00::]:${toString config.networking.ports.enthalpy-gost}"; ExecStart = "${pkgs.gost}/bin/gost -L=socks5://[fc00::]:${toString config.networking.ports.enthalpy-gost}";
ProtectSystem = "full"; ProtectSystem = "full";
ProtectHome = "yes"; ProtectHome = "yes";

View file

@ -64,7 +64,6 @@ in
Restart = "on-failure"; Restart = "on-failure";
RestartSec = 5; RestartSec = 5;
DynamicUser = true; DynamicUser = true;
RuntimeDirectory = "enthalpy";
ExecStart = "${pkgs.tayga}/bin/tayga --config ${pkgs.writeText "tayga.conf" '' ExecStart = "${pkgs.tayga}/bin/tayga --config ${pkgs.writeText "tayga.conf" ''
tun-device nat64 tun-device nat64
ipv6-addr fc00:: ipv6-addr fc00::