From ce93de4f62940d9081ed441507ea10197f6f88cd Mon Sep 17 00:00:00 2001 From: Peter Hoeg Date: Tue, 27 Apr 2021 17:10:27 +0800 Subject: nixos/hyperv: bail gracefully if device is missing --- nixos/modules/virtualisation/hyperv-guest.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/modules/virtualisation/hyperv-guest.nix b/nixos/modules/virtualisation/hyperv-guest.nix index a3656c307f9..b3bcfff1980 100644 --- a/nixos/modules/virtualisation/hyperv-guest.nix +++ b/nixos/modules/virtualisation/hyperv-guest.nix @@ -56,6 +56,8 @@ in { systemd = { packages = [ config.boot.kernelPackages.hyperv-daemons.lib ]; + services.hv-vss.unitConfig.ConditionPathExists = [ "/dev/vmbus/hv_vss" ]; + targets.hyperv-daemons = { wantedBy = [ "multi-user.target" ]; }; -- cgit 1.4.1