nixos-configs/modules/services/libvirt.nix
Paul-Henri Froidmont 75d5fa6417
Fix backlight control
2023-03-23 01:56:21 +01:00

21 lines
438 B
Nix

{ config, lib, pkgs, ... }:
with lib;
with lib.my;
let cfg = config.modules.services.libvirt;
in {
options.modules.services.libvirt = { enable = mkBoolOpt false; };
config = mkIf cfg.enable {
virtualisation = {
libvirtd.enable = true;
spiceUSBRedirection.enable = true;
};
users.users.${config.user.name}.extraGroups = [ "libvirtd" ];
environment.systemPackages = with pkgs; [ virt-manager ];
};
}