整理 kvm guest

This commit is contained in:
2023-07-22 18:05:55 +08:00
parent 91e866b14d
commit 0f9e579d5b
3 changed files with 7 additions and 2 deletions

View File

@@ -223,6 +223,7 @@
waydroid.enable = true;
docker.enable = true;
kvmHost = { enable = true; gui = true; autoSuspend = [ "win10" "hardconnect" ]; };
kvmGuest.enable = true;
};
};}
)
@@ -247,7 +248,6 @@
./modules/packages/hpc.nix
[ ./modules/users/root.nix {} ]
[ ./modules/users/chn.nix {} ]
./modules/virtualisation/kvm_guest.nix
./modules/home/root.nix
./modules/home/chn.nix
]

View File

@@ -1 +0,0 @@
{ config.services = { qemuGuest.enable = true; spice-vdagentd.enable = true; xserver.videoDrivers = [ "qxl" ]; }; }

View File

@@ -10,6 +10,7 @@ inputs:
gui = mkOption { default = false; type = types.bool; };
autoSuspend = mkOption { type = types.listOf types.string; };
};
kvmGuest.enable = mkOption { default = false; type = types.bool; };
};
config = let inherit (inputs.lib) mkMerge mkIf; in mkMerge
[
@@ -124,6 +125,11 @@ inputs:
builtins.listToAttrs (makeServices makeHibernate ++ makeServices makeResume);
}
)
# kvmGuest
(
mkIf inputs.config.nixos.virtualization.kvmGuest.enable
{ services = { qemuGuest.enable = true; spice-vdagentd.enable = true; xserver.videoDrivers = [ "qxl" ]; }; }
)
];
}