diff options
Diffstat (limited to 'modules/core/virtualisation')
| -rw-r--r-- | modules/core/virtualisation/default.nix | 14 | ||||
| -rw-r--r-- | modules/core/virtualisation/docker.nix | 32 | ||||
| -rw-r--r-- | modules/core/virtualisation/libvirtd.nix | 15 | ||||
| -rw-r--r-- | modules/core/virtualisation/qemu.nix | 45 |
4 files changed, 0 insertions, 106 deletions
diff --git a/modules/core/virtualisation/default.nix b/modules/core/virtualisation/default.nix deleted file mode 100644 index 97aa4b9..0000000 --- a/modules/core/virtualisation/default.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ - imports = [ - ./docker.nix - ./libvirtd.nix - ./qemu.nix - ]; - - programs.extra-container.enable = true; - - virtualisation = { - kvmgt.enable = true; - spiceUSBRedirection.enable = true; - }; -} diff --git a/modules/core/virtualisation/docker.nix b/modules/core/virtualisation/docker.nix deleted file mode 100644 index c35beb6..0000000 --- a/modules/core/virtualisation/docker.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ lib, ... }: -{ - virtualisation.docker = { - enable = true; - storageDriver = "overlay2"; - enableOnBoot = false; - liveRestore = true; - enableNvidia = lib.mkForce true; - - daemon.settings = { - default-runtime = "nvidia"; - experimental = true; - iptables = false; - }; - - autoPrune = { - enable = true; - dates = "daily"; - }; - - rootless = { - enable = false; - setSocketVariable = true; - - daemon.settings = { - default-runtime = "nvidia"; - experimental = true; - iptables = false; - }; - }; - }; -} diff --git a/modules/core/virtualisation/libvirtd.nix b/modules/core/virtualisation/libvirtd.nix deleted file mode 100644 index 556135b..0000000 --- a/modules/core/virtualisation/libvirtd.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ pkgs, ... }: -{ - boot.extraModprobeConfig = "options kvm_intel nested=1"; - - environment.systemPackages = with pkgs; [ - virt-manager - virt-viewer - ]; - - virtualisation.libvirtd = { - enable = true; - onBoot = "ignore"; - onShutdown = "shutdown"; - }; -} diff --git a/modules/core/virtualisation/qemu.nix b/modules/core/virtualisation/qemu.nix deleted file mode 100644 index 849ead1..0000000 --- a/modules/core/virtualisation/qemu.nix +++ /dev/null @@ -1,45 +0,0 @@ -{ pkgs, ... }: -{ - environment.systemPackages = with pkgs; [ - qemu_kvm - qemu - ]; - - hardware.pulseaudio.extraConfig = '' - load-module module-native-protocol-unix auth-group=qemu-libvirtd socket=/tmp/pulse-socket - ''; - - boot.kernelModules = [ "vfio-pci" ]; - - networking.firewall.trustedInterfaces = [ - "virbr0" - "br0" - ]; - - services.udev.extraRules = '' - SUBSYSTEM=="vfio", OWNER="root", GROUP="kvm" - ''; - - virtualisation.libvirtd.qemu = { - package = pkgs.qemu_kvm; - runAsRoot = true; - swtpm.enable = true; - - ovmf = { - enable = true; - - packages = [ - (pkgs.OVMFFull.override { - secureBoot = true; - tpmSupport = true; - }).fd - ]; - }; - - verbatimConfig = '' - namespaces = [] - - dynamic_ownership = 0 - ''; - }; -} |