!tCyGickeVqkHsYjWnh:nixos.org

NixOS Networking

893 Members
Declaratively manage your switching, routing, wireless, tunneling and more.261 Servers

Load older messages


SenderMessageTime
8 Jul 2025
@zhaofeng:zhaofeng.liZhaofeng Limaybe let's just give kea a UID and call it a day 🫠23:58:20
@zhaofeng:zhaofeng.liZhaofeng Li * looks like having multiple DynamicUser= services sharing the same RuntimeDirectory= isn't a good idea after all: https://github.com/systemd/systemd/issues/5394 23:58:43
9 Jul 2025
@zhaofeng:zhaofeng.liZhaofeng Li *

looks like having multiple ~~DynamicUser=~~ services sharing the same RuntimeDirectory= isn't a good idea after all: https://github.com/systemd/systemd/issues/5394

Edit: I think sharing RuntimeDirectory just isn't supported, even with static User=s

00:11:59
@hexa:lossy.networkhexaok yeah, right00:26:22
@hexa:lossy.networkhexacan't repro the sucess anymore00:26:28
@hexa:lossy.networkhexawild00:26:32
@zhaofeng:zhaofeng.liZhaofeng Limaybe we can just... uh, chmod before starting the actual daemon 🫠00:27:01
@zhaofeng:zhaofeng.liZhaofeng Libut a more fundamental issue is that what we are doing isn't really supported, looking at the systemd issues00:28:02
@hexa:lossy.networkhexait's funny that it used to work and now only the ownership is off00:28:32
@hexa:lossy.networkhexa* it's funny that it used to work and now only the permissions are off00:28:41
@hexa:lossy.networkhexawhat even?00:28:43
@hexa:lossy.networkhexathe issue with moving creating non-shared runtime dirs is that its breaking for the socket-path option00:37:49
@hexa:lossy.networkhexawell, I can probably keep /run/kea alive with a static user00:38:23
@hexa:lossy.networkhexawith tmpfiles, right?00:38:49
@zhaofeng:zhaofeng.liZhaofeng Liactually it's not that easy00:39:09
@zhaofeng:zhaofeng.liZhaofeng Li because there is state in /var/lib/private/kea 00:39:22
@hexa:lossy.networkhexai remember systemd migrating state between dynamicuser=true/false00:39:47
@zhaofeng:zhaofeng.liZhaofeng Lioh really?00:40:06
@zhaofeng:zhaofeng.liZhaofeng Li but still, if you have some kind of impermanence setup where you mount /var/lib/private/kea you are still screwed 00:40:31
@hexa:lossy.networkhexae.g. https://github.com/systemd/systemd/pull/1503300:40:40
@hexa:lossy.networkhexatrue, but there is not much we can do about that, right"?00:40:55
@hexa:lossy.networkhexa* true, but there is not much we can do about that, right?00:40:56
@zhaofeng:zhaofeng.liZhaofeng Libut it's kind of rude to break stable like that00:42:46
@hexa:lossy.networkhexayeah, true00:43:05
@hexa:lossy.networkhexaso we hack around with chmod in prestart?00:43:21
@hexa:lossy.networkhexa* so we hack around with chmod in prestart for now00:44:09
@zhaofeng:zhaofeng.liZhaofeng Liyeah, looks like the least dramatic option, though not ideal00:45:06
@zhaofeng:zhaofeng.liZhaofeng Li maybe we can migrate to a static user, but force everyone with stateVersion <= 25.11 to explicitly set stateDir to acknowledge the migration 00:46:41
@zhaofeng:zhaofeng.liZhaofeng Li * maybe we can migrate to a static user in unstable, but force everyone with stateVersion <= 25.11 to explicitly set stateDir to acknowledge the migration 00:47:13
@hexa:lossy.networkhexa
diff --git a/nixos/modules/services/networking/kea.nix b/nixos/modules/services/networking/kea.nix
index 6e0af62425a4..6f815659f567 100644
--- a/nixos/modules/services/networking/kea.nix
+++ b/nixos/modules/services/networking/kea.nix
@@ -272,12 +272,13 @@ in
       };
 
       commonServiceConfig = {
-        ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
+        ExecStartPre = "${lib.getExe' pkgs.coreutils "chmod"} 0750 /run/kea";
+        ExecReload = "${lib.getExe' pkgs.coreutils "kill"} -HUP $MAINPID";
         DynamicUser = true;
         User = "kea";
         ConfigurationDirectory = "kea";
         RuntimeDirectory = "kea";
-        RuntimeDirectoryMode = "750";
+        RuntimeDirectoryMode = "0750";
         RuntimeDirectoryPreserve = true;
         StateDirectory = "kea";
         UMask = "0077";
00:47:46

Show newer messages


Back to Room ListRoom Version: 6