mirror of
https://github.com/Stunkymonkey/nixos.git
synced 2025-05-24 09:54:40 +02:00
treewide: fmt
This commit is contained in:
parent
330abe53d2
commit
ea37c7b836
95 changed files with 1162 additions and 779 deletions
|
@ -7,32 +7,31 @@ in
|
|||
enable = mkEnableOption "kvm configuration";
|
||||
|
||||
cpuFlavor = mkOption {
|
||||
type = with types; nullOr (enum [ "intel" "amd" ]);
|
||||
type =
|
||||
with types;
|
||||
nullOr (enum [
|
||||
"intel"
|
||||
"amd"
|
||||
]);
|
||||
default = null;
|
||||
example = "intel";
|
||||
description = "Which kind of CPU to activate kernelModules";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable (lib.mkMerge [
|
||||
{
|
||||
virtualisation.libvirtd.enable = true;
|
||||
config = lib.mkIf cfg.enable (
|
||||
lib.mkMerge [
|
||||
{
|
||||
virtualisation.libvirtd.enable = true;
|
||||
|
||||
programs.virt-manager.enable = true;
|
||||
}
|
||||
programs.virt-manager.enable = true;
|
||||
}
|
||||
|
||||
# Intel CPU
|
||||
(lib.mkIf (cfg.cpuFlavor == "intel") {
|
||||
boot.kernelModules = [
|
||||
"kvm-intel"
|
||||
];
|
||||
})
|
||||
# Intel CPU
|
||||
(lib.mkIf (cfg.cpuFlavor == "intel") { boot.kernelModules = [ "kvm-intel" ]; })
|
||||
|
||||
# AMD CPU
|
||||
(lib.mkIf (cfg.cpuFlavor == "amd") {
|
||||
boot.kernelModules = [
|
||||
"kvm-amd"
|
||||
];
|
||||
})
|
||||
]);
|
||||
# AMD CPU
|
||||
(lib.mkIf (cfg.cpuFlavor == "amd") { boot.kernelModules = [ "kvm-amd" ]; })
|
||||
]
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue