System Gen157 @ 2025-04-02-23:14:18
This commit is contained in:
parent
4ced04a69c
commit
5cb2927045
@ -19,11 +19,15 @@
|
|||||||
../../modules/hardware/sound.nix
|
../../modules/hardware/sound.nix
|
||||||
../../modules/hardware/yubikey.nix
|
../../modules/hardware/yubikey.nix
|
||||||
../../modules/programs.nix
|
../../modules/programs.nix
|
||||||
|
../../modules/services/virt-manager.nix
|
||||||
];
|
];
|
||||||
desktop.dm.name = "sddm";
|
desktop.dm.name = "sddm";
|
||||||
desktop.de.plasma.enable = false;
|
desktop.de.plasma.enable = false;
|
||||||
desktop.de.hyprland.enable = true;
|
desktop.de.hyprland.enable = true;
|
||||||
|
|
||||||
|
services.virt-manager.enable = true;
|
||||||
|
services.virt-manager.forUsers = ["jonas"];
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
settings = {
|
settings = {
|
||||||
experimental-features = ["nix-command" "flakes"];
|
experimental-features = ["nix-command" "flakes"];
|
||||||
|
|||||||
33
modules/services/virt-manager.nix
Normal file
33
modules/services/virt-manager.nix
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.services.virt-manager;
|
||||||
|
in {
|
||||||
|
options = {
|
||||||
|
services.virt-manager = {
|
||||||
|
enable = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
Enable the qemu-kvm + libvirt stack.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
forUsers = lib.mkOption {
|
||||||
|
type = lib.types.listOf lib.types.string;
|
||||||
|
default = [];
|
||||||
|
description = ''
|
||||||
|
List of users that should be added to the libvirt group.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
programs.virt-manager.enable = true;
|
||||||
|
users.groups.libvirtd.members = cfg.forUsers;
|
||||||
|
virtualisation.libvirtd.enable = true;
|
||||||
|
virtualisation.spiceUSBRedirection.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user