NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.08k stars 14.13k forks source link

libvirtd service starts every rebuild #338314

Open llakala opened 2 months ago

llakala commented 2 months ago

Issue description

As described in the title, the libvirtd service is started on every rebuild. Ideally, it would only starts on relevant changes to its config. My rebuild output after making no external changes:

~ ❯ sudo nixos-rebuild switch
building the system configuration...
activating the configuration...
setting up /etc...
reloading user units for emanresu...
restarting sysinit-reactivation.target
the following new units were started: libvirtd.service

Steps to reproduce

Set virtualisation.libvirtd.enable = true;

Technical details

SuperSandro2000 commented 2 months ago

Could be because of the socket target here https://github.com/NixOS/nixpkgs/blob/6d53aa808a44c5a522a3b1115d95817b6fcbc840/nixos/modules/virtualisation/libvirtd.nix#L525