nixos/libvirt: Adapt libvirtd.service to upstream sources

This commit is contained in:
Rickard Nilsson 2016-06-27 13:02:15 +02:00
parent 37f4889851
commit 1b54e48561

View File

@ -147,19 +147,12 @@ in
done done
''; # */ ''; # */
serviceConfig.ExecStart = ''@${pkgs.libvirt}/sbin/libvirtd libvirtd --config "${configFile}" --daemon ${concatStringsSep " " cfg.extraOptions}''; serviceConfig = {
serviceConfig.Type = "forking"; ExecStart = ''@${pkgs.libvirt}/sbin/libvirtd libvirtd --config "${configFile}" --daemon ${concatStringsSep " " cfg.extraOptions}'';
serviceConfig.KillMode = "process"; # when stopping, leave the VMs alone Type = "notify";
KillMode = "process"; # when stopping, leave the VMs alone
# Wait until libvirtd is ready to accept requests. Restart = "on-failure";
postStart = };
''
for ((i = 0; i < 60; i++)); do
if ${pkgs.libvirt}/bin/virsh list > /dev/null; then exit 0; fi
sleep 1
done
exit 1 # !!! seems to be ignored
'';
}; };
users.extraGroups.libvirtd.gid = config.ids.gids.libvirtd; users.extraGroups.libvirtd.gid = config.ids.gids.libvirtd;