nixos/qemu-vm: set daemon user in register-nix-paths

The register-nix-paths service caused the nix database to be owned by
root, breaking unprivileged daemon support.

It is unclear why this worked previously.
This commit is contained in:
Artemis Tosini
2026-06-01 14:13:13 -04:00
parent d08f2c1f8f
commit 0fd107dc2e
+2
View File
@@ -1307,6 +1307,8 @@ in
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
User = lib.mkIf (config.nix.daemonUser != "root") config.nix.daemonUser;
Group = lib.mkIf (config.nix.daemonGroup != "root") config.nix.daemonGroup;
};
script = ''
if [[ "$(cat /proc/cmdline)" =~ regInfo=([^ ]*) ]]; then