add libvirt and virt manager

This commit is contained in:
Jérémie SALVI
2025-10-29 21:27:18 +01:00
parent 7fa9f95ce4
commit 9c0bf5fabf
4 changed files with 34 additions and 2 deletions

View File

@@ -14,7 +14,6 @@
description = "Admin account"; description = "Admin account";
extraGroups = [ extraGroups = [
"wheel" "wheel"
"networkmanager"
"audio" "audio"
"video" "video"
]; ];

View File

@@ -0,0 +1,7 @@
{
...
}:
{
programs.virt-manager.enable = true;
virtualisation.spiceUSBRedirection.enable = true;
}

View File

@@ -1,11 +1,12 @@
{ {
pkgs, username,
... ...
}: }:
{ {
imports = [ imports = [
../autologin.nix ../autologin.nix
../k8s.nix ../k8s.nix
../libvirt.nix
../openfortivpn.nix ../openfortivpn.nix
../packages.nix ../packages.nix
../sops-desktop.nix ../sops-desktop.nix
@@ -22,6 +23,7 @@
../desktop/qwerty-fr.nix ../desktop/qwerty-fr.nix
../desktop/rofi.nix ../desktop/rofi.nix
../desktop/starship.nix ../desktop/starship.nix
../desktop/virt-manager.nix
../desktop/wayland.nix ../desktop/wayland.nix
### Import Graphics modules ### Import Graphics modules
@@ -33,6 +35,9 @@
extraHosts = '' extraHosts = ''
carto-interavtive 172.18.20.134 carto-interavtive 172.18.20.134
''; '';
};
users.users.${username} = {
extraGroups = [ "networkmanager" ];
}; };
programs.nm-applet.enable = true; programs.nm-applet.enable = true;
} }

View File

@@ -0,0 +1,21 @@
{
pkgs,
username,
...
}:
{
virtualisation = {
libvirtd = {
enable = true;
qemu = {
package = pkgs.qemu_full;
runAsRoot = true;
swtpm.enable = true;
};
};
};
users.users.${username} = {
extraGroups = [ "libvirtd" ];
};
}