mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 04:19:22 +08:00
整理 kvm guest
This commit is contained in:
@@ -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
|
||||
]
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
{ config.services = { qemuGuest.enable = true; spice-vdagentd.enable = true; xserver.videoDrivers = [ "qxl" ]; }; }
|
||||
@@ -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" ]; }; }
|
||||
)
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user