Modularize everything
This commit is contained in:
parent
d5cbf61286
commit
68d301c666
21 changed files with 536 additions and 240 deletions
20
modules/services/libvirt.nix
Normal file
20
modules/services/libvirt.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{ 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.froidmpa.extraGroups = [ "libvirtd" ];
|
||||
|
||||
environment.systemPackages = with pkgs; [ virt-manager ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue