!tCyGickeVqkHsYjWnh:nixos.org

NixOS Networking

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

You have reached the beginning of time (for this room).


SenderMessageTime
9 Jul 2025
@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
@hexa:lossy.networkhexathis change nothing00:47:56
@hexa:lossy.networkhexa* this changes nothing00:48:38
@zhaofeng:zhaofeng.liZhaofeng Li it seems racy... I added the chmod to script (not ExecStartPre) and it failed once but worked the next two tries? 00:52:03
@zhaofeng:zhaofeng.liZhaofeng Liwhat even is going on00:52:11
@hexa:lossy.networkhexacan only be systemd doing this00:52:45
@zhaofeng:zhaofeng.liZhaofeng Lithis is beyond cursed00:54:40
@zhaofeng:zhaofeng.liZhaofeng Li how about we patch kea to skip the permission check if NIXPKGS_HACK_ASSUME_THAT_THE_SOCKET_DIR_IS_PROTECTED_BY_SYSTEMD is set 00:55:22
@hexa:lossy.networkhexabut it isn't protected, it is 0755 😄 00:56:04
@hexa:lossy.networkhexa* but it isn't protected, it is fucking 0755 😄 00:56:09
@zhaofeng:zhaofeng.liZhaofeng Li /var/run/private is protected, right? 00:57:42
@hexa:lossy.networkhexauhhh yeah00:58:46
@hexa:lossy.networkhexaI think so00:58:54
@hexa:lossy.networkhexa Zhaofeng Li: Restart = "on-failure" 🫣 01:14:38

Show newer messages


Back to Room ListRoom Version: 6