Parameterise libvirt

This commit is contained in:
Simon Bruder 2020-12-05 15:37:44 +01:00
parent ab39c6035c
commit a23c3801cb
No known key found for this signature in database
GPG key ID: 6F03E0000CC5B62F
4 changed files with 9 additions and 4 deletions

View file

@ -6,7 +6,6 @@
./hardware-configuration.nix
../../modules/cpu/intel.nix
../../modules/gpu/intel.nix
../../modules/libvirt.nix
../../modules
../../profiles/dev.nix
../../users/simon
@ -14,6 +13,7 @@
sbruder = {
gui = true;
libvirt.enable = true;
restic.enable = true;
ssd.enable = true;
wireguard.home = {

View file

@ -6,7 +6,6 @@
./hardware-configuration.nix
../../modules/cpu/intel.nix
../../modules/gpu/amd.nix
../../modules/libvirt.nix
../../modules
../../profiles/dev.nix
../../users/simon
@ -14,6 +13,7 @@
sbruder = {
gui = true;
libvirt.enable = true;
restic.enable = true;
ssd.enable = true;
wireguard.home = {

View file

@ -15,6 +15,7 @@
./docker.nix
./fonts.nix
./grub.nix
./libvirt.nix
./locales.nix
./media.nix
./network-manager.nix

View file

@ -1,7 +1,11 @@
{ config, lib, pkgs, ... }:
{
virtualisation.libvirtd.enable = true;
options.sbruder.libvirt.enable = lib.mkEnableOption "libvirt";
environment.systemPackages = lib.mkIf config.sbruder.gui [ pkgs.virt-manager ];
config = {
virtualisation.libvirtd.enable = config.sbruder.libvirt.enable;
environment.systemPackages = lib.mkIf config.sbruder.gui [ pkgs.virt-manager ];
};
}