diff options
author | Robin Gloster <mail@glob.in> | 2016-01-06 06:50:18 +0000 |
---|---|---|
committer | Robin Gloster <mail@glob.in> | 2016-01-07 06:39:06 +0000 |
commit | 88292fdf09960e9cb8e3c063a6b95ac4284222ec (patch) | |
tree | 34ff267ed7bacf9fd906b1736476b431e9afe909 /nixos/modules/virtualisation/libvirtd.nix | |
parent | af50b03f50d88954e98018c7c18c0581928b7165 (diff) |
jobs -> systemd.services
Diffstat (limited to 'nixos/modules/virtualisation/libvirtd.nix')
-rw-r--r-- | nixos/modules/virtualisation/libvirtd.nix | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/nixos/modules/virtualisation/libvirtd.nix b/nixos/modules/virtualisation/libvirtd.nix index 16aedbbb185d..3668d17ac89b 100644 --- a/nixos/modules/virtualisation/libvirtd.nix +++ b/nixos/modules/virtualisation/libvirtd.nix @@ -166,33 +166,33 @@ in ''; }; - jobs."libvirt-guests" = - { description = "Libvirt Virtual Machines"; + systemd.services."libvirt-guests" = { + description = "Libvirt Virtual Machines"; - wantedBy = [ "multi-user.target" ]; - wants = [ "libvirtd.service" ]; - after = [ "libvirtd.service" ]; + wantedBy = [ "multi-user.target" ]; + wants = [ "libvirtd.service" ]; + after = [ "libvirtd.service" ]; - restartIfChanged = false; + restartIfChanged = false; - path = [ pkgs.gettext pkgs.libvirt pkgs.gawk ]; + path = with pkgs; [ gettext libvirt gawk ]; - preStart = - '' - mkdir -p /var/lock/subsys -m 755 - ${pkgs.libvirt}/etc/rc.d/init.d/libvirt-guests start || true - ''; + preStart = '' + mkdir -p /var/lock/subsys -m 755 + ${pkgs.libvirt}/etc/rc.d/init.d/libvirt-guests start || true + ''; - postStop = - '' - export PATH=${pkgs.gettext}/bin:$PATH - export ON_SHUTDOWN=${cfg.onShutdown} - ${pkgs.libvirt}/etc/rc.d/init.d/libvirt-guests stop - ''; + postStop = '' + export PATH=${pkgs.gettext}/bin:$PATH + export ON_SHUTDOWN=${cfg.onShutdown} + ${pkgs.libvirt}/etc/rc.d/init.d/libvirt-guests stop + ''; - serviceConfig.Type = "oneshot"; - serviceConfig.RemainAfterExit = true; + serviceConfig = { + Type = "oneshot"; + RemainAfterExit = true; }; + }; users.extraGroups.libvirtd.gid = config.ids.gids.libvirtd; |