Begin Dendritic rewrite
This commit is contained in:
@@ -1,31 +1,27 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
{ ... }: {
|
||||
|
||||
options.sysconfig.virtual-machines.enable = with lib; mkOption {
|
||||
type = with types; bool;
|
||||
default = false;
|
||||
};
|
||||
flake.nixosModules.default = { config, lib, pkgs, ... }: {
|
||||
|
||||
imports = let
|
||||
dir = builtins.readDir ./.;
|
||||
in builtins.map (x: ./${x}) (builtins.filter
|
||||
(file: (dir.${file} == "directory"))
|
||||
(builtins.attrNames dir)
|
||||
);
|
||||
|
||||
config = lib.mkIf config.sysconfig.virtual-machines.enable {
|
||||
programs.virt-manager.enable = true;
|
||||
|
||||
virtualisation = {
|
||||
libvirtd = {
|
||||
enable = true;
|
||||
qemu.swtpm.enable = true;
|
||||
};
|
||||
|
||||
spiceUSBRedirection.enable = true;
|
||||
options.sysconfig.virtual-machines.enable = with lib; mkOption {
|
||||
type = with types; bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; lib.mkIf config.sysconfig.graphical [
|
||||
virt-viewer
|
||||
];
|
||||
config = lib.mkIf config.sysconfig.virtual-machines.enable {
|
||||
programs.virt-manager.enable = true;
|
||||
|
||||
virtualisation = {
|
||||
libvirtd = {
|
||||
enable = true;
|
||||
qemu.swtpm.enable = true;
|
||||
};
|
||||
|
||||
spiceUSBRedirection.enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; lib.mkIf config.sysconfig.graphical [
|
||||
virt-viewer
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user