Merge pull request #263315 from chayleaf/kea

kea: use separate runtime directories for each service
This commit is contained in:
Martin Weinelt
2023-10-25 22:29:31 +02:00
committed by GitHub
4 changed files with 18 additions and 13 deletions

View File

@@ -333,6 +333,8 @@
- `ssm-agent` package and module were renamed to `amazon-ssm-agent` to be consistent with the upstream package name. - `ssm-agent` package and module were renamed to `amazon-ssm-agent` to be consistent with the upstream package name.
- `services.kea.{ctrl-agent,dhcp-ddns,dhcp,dhcp6}` now use separate runtime directories instead of `/run/kea` to work around the runtime directory being cleared on service start.
## Other Notable Changes {#sec-release-23.11-notable-changes} ## Other Notable Changes {#sec-release-23.11-notable-changes}
- The Cinnamon module now enables XDG desktop integration by default. If you are experiencing collisions related to xdg-desktop-portal-gtk you can safely remove `xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];` from your NixOS configuration. - The Cinnamon module now enables XDG desktop integration by default. If you are experiencing collisions related to xdg-desktop-portal-gtk you can safely remove `xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];` from your NixOS configuration.

View File

@@ -15,8 +15,8 @@ in {
type = types.listOf types.str; type = types.listOf types.str;
example = literalExpression '' example = literalExpression ''
[ [
"/run/kea/kea-dhcp4.socket" "/run/kea-dhcp4/kea-dhcp4.socket"
"/run/kea/kea-dhcp6.socket" "/run/kea-dhcp6/kea-dhcp6.socket"
] ]
''; '';
description = lib.mdDoc '' description = lib.mdDoc ''

View File

@@ -254,7 +254,6 @@ in
DynamicUser = true; DynamicUser = true;
User = "kea"; User = "kea";
ConfigurationDirectory = "kea"; ConfigurationDirectory = "kea";
RuntimeDirectory = "kea";
StateDirectory = "kea"; StateDirectory = "kea";
UMask = "0077"; UMask = "0077";
}; };
@@ -289,8 +288,8 @@ in
]; ];
environment = { environment = {
KEA_PIDFILE_DIR = "/run/kea"; KEA_PIDFILE_DIR = "/run/kea-ctrl-agent";
KEA_LOCKFILE_DIR = "/run/kea"; KEA_LOCKFILE_DIR = "/run/kea-ctrl-agent";
}; };
restartTriggers = [ restartTriggers = [
@@ -301,6 +300,7 @@ in
ExecStart = "${package}/bin/kea-ctrl-agent -c /etc/kea/ctrl-agent.conf ${lib.escapeShellArgs cfg.ctrl-agent.extraArgs}"; ExecStart = "${package}/bin/kea-ctrl-agent -c /etc/kea/ctrl-agent.conf ${lib.escapeShellArgs cfg.ctrl-agent.extraArgs}";
KillMode = "process"; KillMode = "process";
Restart = "on-failure"; Restart = "on-failure";
RuntimeDirectory = "kea-ctrl-agent";
} // commonServiceConfig; } // commonServiceConfig;
}; };
}) })
@@ -329,8 +329,8 @@ in
]; ];
environment = { environment = {
KEA_PIDFILE_DIR = "/run/kea"; KEA_PIDFILE_DIR = "/run/kea-dhcp4";
KEA_LOCKFILE_DIR = "/run/kea"; KEA_LOCKFILE_DIR = "/run/kea-dhcp4";
}; };
restartTriggers = [ restartTriggers = [
@@ -348,6 +348,7 @@ in
"CAP_NET_BIND_SERVICE" "CAP_NET_BIND_SERVICE"
"CAP_NET_RAW" "CAP_NET_RAW"
]; ];
RuntimeDirectory = "kea-dhcp4";
} // commonServiceConfig; } // commonServiceConfig;
}; };
}) })
@@ -376,8 +377,8 @@ in
]; ];
environment = { environment = {
KEA_PIDFILE_DIR = "/run/kea"; KEA_PIDFILE_DIR = "/run/kea-dhcp6";
KEA_LOCKFILE_DIR = "/run/kea"; KEA_LOCKFILE_DIR = "/run/kea-dhcp6";
}; };
restartTriggers = [ restartTriggers = [
@@ -393,6 +394,7 @@ in
CapabilityBoundingSet = [ CapabilityBoundingSet = [
"CAP_NET_BIND_SERVICE" "CAP_NET_BIND_SERVICE"
]; ];
RuntimeDirectory = "kea-dhcp6";
} // commonServiceConfig; } // commonServiceConfig;
}; };
}) })
@@ -421,8 +423,8 @@ in
]; ];
environment = { environment = {
KEA_PIDFILE_DIR = "/run/kea"; KEA_PIDFILE_DIR = "/run/kea-dhcp-ddns";
KEA_LOCKFILE_DIR = "/run/kea"; KEA_LOCKFILE_DIR = "/run/kea-dhcp-ddns";
}; };
restartTriggers = [ restartTriggers = [
@@ -437,6 +439,7 @@ in
CapabilityBoundingSet = [ CapabilityBoundingSet = [
"CAP_NET_BIND_SERVICE" "CAP_NET_BIND_SERVICE"
]; ];
RuntimeDirectory = "kea-dhcp-ddns";
} // commonServiceConfig; } // commonServiceConfig;
}; };
}) })

View File

@@ -416,8 +416,8 @@ let
}; };
kea = let kea = let
controlSocketPathV4 = "/run/kea/dhcp4.sock"; controlSocketPathV4 = "/run/kea-dhcp4/dhcp4.sock";
controlSocketPathV6 = "/run/kea/dhcp6.sock"; controlSocketPathV6 = "/run/kea-dhcp6/dhcp6.sock";
in in
{ {
exporterConfig = { exporterConfig = {