From 49392c53a66d09ee36932a8b96be2aca6bc304d8 Mon Sep 17 00:00:00 2001 From: JuliusFreudenberger Date: Tue, 25 Feb 2025 22:09:38 +0200 Subject: [PATCH] Add virtualisation module --- hosts/julius-framework/default.nix | 1 + modules/virtualization.nix | 14 ++++++++++++++ users/julius/nixos.nix | 2 +- 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 modules/virtualization.nix diff --git a/hosts/julius-framework/default.nix b/hosts/julius-framework/default.nix index 712c251..cef746d 100644 --- a/hosts/julius-framework/default.nix +++ b/hosts/julius-framework/default.nix @@ -32,6 +32,7 @@ ../../modules/typesetting.nix ../../modules/docker.nix ../../modules/distrobox.nix + ../../modules/virtualization.nix ../../modules/gui-coding.nix ../../modules/optical-media.nix ../../modules/flatpak.nix diff --git a/modules/virtualization.nix b/modules/virtualization.nix new file mode 100644 index 0000000..b1cde0f --- /dev/null +++ b/modules/virtualization.nix @@ -0,0 +1,14 @@ +{ + pkgs, + lib, + ... +}: { + environment.systemPackages = with pkgs; [ + virt-manager + ]; + + virtualisation = { + libvirtd.enable = true; + spiceUSBRedirection.enable = true; + }; +} diff --git a/users/julius/nixos.nix b/users/julius/nixos.nix index e32da9d..95d532a 100644 --- a/users/julius/nixos.nix +++ b/users/julius/nixos.nix @@ -6,7 +6,7 @@ }: { users.users.julius = { isNormalUser = true; - extraGroups = [ "wheel" "networkmanager" "docker"]; + extraGroups = [ "wheel" "networkmanager" "docker" "libvirtd" ]; shell = pkgs.zsh; }; }