finally system boots with new config

need to add all my stuff btw
This commit is contained in:
2026-07-11 23:14:30 -05:00
parent bbdb6339b0
commit c5209b0d90
17 changed files with 578 additions and 252 deletions
+36 -22
View File
@@ -1,30 +1,44 @@
{ pkgs, ... }:
{
virtualisation.spiceUSBRedirection.enable = true;
virtualisation = {
containers.enable = true;
libvirtd = {
enable = true;
qemu = {
package = pkgs.qemu_kvm;
swtpm.enable = true;
config,
lib,
pkgs,
...
}:
let
cfg = config.workstation.virtualization;
in
{
config = lib.mkMerge [
(lib.mkIf cfg.qemu.enable {
virtualisation = {
libvirtd = {
enable = true;
qemu = {
package = pkgs.qemu_kvm;
swtpm.enable = true;
};
};
};
};
};
users.users.${cfg.user}.extraGroups = [
"libvirtd"
"kvm"
];
})
networking.firewall.trustedInterfaces = [ "virbr0" ];
(lib.mkIf cfg.qemu.spiceUSBRedirection {
virtualisation.spiceUSBRedirection.enable = true;
})
programs.virt-manager.enable = true;
(lib.mkIf cfg.qemu.virtManager {
programs.virt-manager.enable = true;
})
users.users.river.extraGroups = [
"libvirtd"
"kvm"
];
(lib.mkIf (cfg.qemu.enable && cfg.qemu.containers) {
virtualisation.containers.enable = true;
})
boot.kernelModules = [
"kvm-intel"
"kvm-amd"
(lib.mkIf cfg.qemu.enable {
boot.kernelModules = cfg.qemu.bootModules;
})
];
}