modules/virtualization: refactor
This commit is contained in:
parent
421d490af1
commit
b0ae389685
4 changed files with 16 additions and 13 deletions
|
@ -48,7 +48,6 @@
|
|||
gaming.enableAll = true;
|
||||
gaming.olympus.enable = false; # Build is currently broken
|
||||
};
|
||||
virtualization.enable = true;
|
||||
software.minipro.enable = true;
|
||||
|
||||
backups.extraExcludes = [
|
||||
|
@ -56,6 +55,8 @@
|
|||
];
|
||||
};
|
||||
|
||||
virtualisation.enable = true;
|
||||
|
||||
home = { pkgs, ... }: {
|
||||
home.packages = with pkgs; [
|
||||
arduino
|
||||
|
|
|
@ -30,11 +30,12 @@
|
|||
|
||||
modules = {
|
||||
hardware.form.server = true;
|
||||
virtualization.enable = true;
|
||||
};
|
||||
|
||||
boot.loader.timeout = 5;
|
||||
|
||||
virtualisation.enable = true;
|
||||
|
||||
persist = {
|
||||
directories = [
|
||||
"/srv"
|
||||
|
|
|
@ -37,9 +37,10 @@
|
|||
puzzles.enable = true;
|
||||
};
|
||||
};
|
||||
virtualization.enable = true;
|
||||
};
|
||||
|
||||
virtualisation.enable = true;
|
||||
|
||||
programs.ns-usbloader.enable = true;
|
||||
hardware.uinput.enable = true;
|
||||
services.joycond.enable = true;
|
||||
|
|
|
@ -2,22 +2,22 @@
|
|||
with lib;
|
||||
with lib.our;
|
||||
let
|
||||
cfg = config.modules.virtualization;
|
||||
cfg = config.virtualisation;
|
||||
in
|
||||
{
|
||||
options.modules.virtualization = {
|
||||
options.virtualisation = {
|
||||
enable = mkBoolOpt false;
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
config = {
|
||||
virtualisation = {
|
||||
libvirtd.enable = true;
|
||||
docker.enable = true;
|
||||
libvirtd.enable = mkDefault cfg.enable;
|
||||
docker.enable = mkDefault cfg.enable;
|
||||
};
|
||||
programs.dconf.enable = true;
|
||||
environment.systemPackages = with pkgs; [ virt-manager docker-compose ];
|
||||
persist.directories = [
|
||||
"/var/lib/libvirt"
|
||||
];
|
||||
|
||||
programs.dconf.enable = mkIf cfg.libvirtd.enable true;
|
||||
environment.systemPackages = (optional cfg.libvirtd.enable pkgs.virt-manager)
|
||||
++ (optional cfg.docker.enable pkgs.docker-compose);
|
||||
persist.directories = optional cfg.libvirtd.enable "/var/lib/libvirt";
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue