9 cfg = config.virtualisation.incus.agent;
13 maintainers = lib.teams.lxc.members;
17 virtualisation.incus.agent.enable = lib.mkEnableOption "Incus agent";
20 config = lib.mkIf cfg.enable {
21 services.udev.packages = [ config.virtualisation.incus.package.agent_loader ];
22 systemd.packages = [ config.virtualisation.incus.package.agent_loader ];
24 systemd.services.incus-agent = {
26 wantedBy = [ "multi-user.target" ];
32 # allow `incus exec` to find system binaries
33 "/run/current-system/sw"
36 # avoid killing nixos-rebuild switch when executed through incus exec
37 restartIfChanged = false;
38 stopIfChanged = false;