✨ make use of mkEnableOption
This commit is contained in:
parent
a98589b6f8
commit
5c0752b891
43 changed files with 73 additions and 329 deletions
|
|
@ -9,20 +9,17 @@ let
|
|||
cfg = config.my.virtualisation.libvirtd;
|
||||
in
|
||||
{
|
||||
options.my.virtualisation.libvirtd = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
options.my.virtualisation.libvirtd.enable = mkEnableOption "libvirtd";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
virtualisation.libvirtd = {
|
||||
enable = true;
|
||||
package = pkgs.libvirt;
|
||||
};
|
||||
environment.systemPackages = with pkgs; [ virt-manager ];
|
||||
users.users.moritz.extraGroups = [ "libvirtd" ];
|
||||
|
||||
users.users.moritz = {
|
||||
extraGroups = [ "libvirtd" ];
|
||||
packages = with pkgs; [ virt-manager ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue