From 0fd107dc2e44950d1d35e448024389ca3e59229e Mon Sep 17 00:00:00 2001 From: Artemis Tosini Date: Mon, 1 Jun 2026 14:13:13 -0400 Subject: [PATCH] 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. --- nixos/modules/virtualisation/qemu-vm.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/modules/virtualisation/qemu-vm.nix b/nixos/modules/virtualisation/qemu-vm.nix index 01d0c6cca8c8..121a62e1b6f2 100644 --- a/nixos/modules/virtualisation/qemu-vm.nix +++ b/nixos/modules/virtualisation/qemu-vm.nix @@ -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