mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-06 01:38:06 +00:00
[Desktop/Developer] allow disabling host virtualization services
This commit is contained in:
parent
02b9cc2601
commit
6dca23b979
1 changed files with 3 additions and 2 deletions
|
|
@ -6,6 +6,7 @@ let
|
||||||
in {
|
in {
|
||||||
options.aviallon.developer = {
|
options.aviallon.developer = {
|
||||||
enable = mkEnableOption "enable developer mode on this machine";
|
enable = mkEnableOption "enable developer mode on this machine";
|
||||||
|
virtualization.host.enable = (mkEnableOption "hypervisor virtualization services") // { default = true; };
|
||||||
virtualbox.unstable = mkEnableOption "use unstable virtualbox";
|
virtualbox.unstable = mkEnableOption "use unstable virtualbox";
|
||||||
};
|
};
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
@ -71,7 +72,7 @@ in {
|
||||||
man.enable = true;
|
man.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
virtualisation.libvirtd = {
|
virtualisation.libvirtd = mkIf cfg.virtualization.host.enable {
|
||||||
enable = true;
|
enable = true;
|
||||||
onBoot = "ignore"; # We are doing development, not a server
|
onBoot = "ignore"; # We are doing development, not a server
|
||||||
qemu = {
|
qemu = {
|
||||||
|
|
@ -89,7 +90,7 @@ in {
|
||||||
virtualisation.spiceUSBRedirection.enable = true; # Quality of life
|
virtualisation.spiceUSBRedirection.enable = true; # Quality of life
|
||||||
security.virtualisation.flushL1DataCache = "never"; # We do not care, we are on a dev platform
|
security.virtualisation.flushL1DataCache = "never"; # We do not care, we are on a dev platform
|
||||||
|
|
||||||
virtualisation.virtualbox = {
|
virtualisation.virtualbox = mkIf cfg.virtualization.host.enable {
|
||||||
host.enable = true;
|
host.enable = true;
|
||||||
host.enableExtensionPack = true;
|
host.enableExtensionPack = true;
|
||||||
host.enableHardening = false; # Causes kernel build failures
|
host.enableHardening = false; # Causes kernel build failures
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue