diff --git a/home/default.nix b/home/default.nix index dc3b3eb..6dd2109 100644 --- a/home/default.nix +++ b/home/default.nix @@ -89,6 +89,8 @@ in { file bitwarden-desktop bitwarden-cli + prismlauncher + virt-manager gh diff --git a/hosts/desktop/default.nix b/hosts/desktop/default.nix index 94ec739..286eba6 100644 --- a/hosts/desktop/default.nix +++ b/hosts/desktop/default.nix @@ -8,6 +8,7 @@ darkMode = true; enableHypridle = true; has_battery = false; + enableVirtualisation = true; networking.hostName = "desktop"; diff --git a/options.nix b/options.nix index ab7805d..d234384 100644 --- a/options.nix +++ b/options.nix @@ -53,5 +53,11 @@ default = {}; description = "Additional config for TLP"; }; + + enableVirtualisation = lib.mkOption { + type = lib.types.bool; + default = false; + description = "Enable virtualization features."; + }; }; } diff --git a/system/default.nix b/system/default.nix index 0d72b2e..2632e98 100644 --- a/system/default.nix +++ b/system/default.nix @@ -98,6 +98,17 @@ }; }; + virtualisation = lib.mkIf config.enableVirtualisation { + libvirtd = { + enable = true; + qemu = { + package = pkgs.qemu_kvm; + runAsRoot = true; + swtpm.enable = true; + }; + }; + }; + networking = { nameservers = [ "9.9.9.9#dns.quad9.net" "1.1.1.1#one.one.one.one" ]; # networkmanager.wifi.backend = "iwd"; diff --git a/user/default.nix b/user/default.nix index 09e1c28..ed85da2 100644 --- a/user/default.nix +++ b/user/default.nix @@ -12,7 +12,7 @@ in { home = "/home/${user.username}"; createHome = true; isNormalUser = true; - extraGroups = [ "wheel" "input" "nordvpn" "networkmanager" ]; + extraGroups = [ "wheel" "input" "nordvpn" "networkmanager" "libvirtd" ]; }; programs.zsh.enable = true;