summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Hoeg <peter@hoeg.com>2021-04-27 17:10:27 +0800
committerPeter Hoeg <peter@hoeg.com>2021-04-29 09:37:17 +0800
commitce93de4f62940d9081ed441507ea10197f6f88cd (patch)
treee036120626166978445604dd7f2b2fbee1223524
parent01d55fcd5ede7bb2f9ba85f9ef4d0e5d02bdd134 (diff)
downloadnixpkgs-ce93de4f62940d9081ed441507ea10197f6f88cd.tar
nixpkgs-ce93de4f62940d9081ed441507ea10197f6f88cd.tar.gz
nixpkgs-ce93de4f62940d9081ed441507ea10197f6f88cd.tar.bz2
nixpkgs-ce93de4f62940d9081ed441507ea10197f6f88cd.tar.lz
nixpkgs-ce93de4f62940d9081ed441507ea10197f6f88cd.tar.xz
nixpkgs-ce93de4f62940d9081ed441507ea10197f6f88cd.tar.zst
nixpkgs-ce93de4f62940d9081ed441507ea10197f6f88cd.zip
nixos/hyperv: bail gracefully if device is missing
-rw-r--r--nixos/modules/virtualisation/hyperv-guest.nix2
1 files changed, 2 insertions, 0 deletions
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" ];
       };