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

View file

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

View file

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

View file

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