summaryrefslogtreecommitdiff
path: root/modules/core/virtualisation
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-09-22 15:12:25 -0700
committerFuwn <[email protected]>2024-09-22 15:13:02 -0700
commit9884d07e6574ef81e1e7da94f90ee08bee036dd3 (patch)
tree268ddd123679ca3b6b5b56a2b3b9d9707271b2f7 /modules/core/virtualisation
parentlock: rui, tsutsumi (diff)
downloadnixos-config-9884d07e6574ef81e1e7da94f90ee08bee036dd3.tar.xz
nixos-config-9884d07e6574ef81e1e7da94f90ee08bee036dd3.zip
core: move variables and virtualisation to desktop
Diffstat (limited to 'modules/core/virtualisation')
-rw-r--r--modules/core/virtualisation/default.nix14
-rw-r--r--modules/core/virtualisation/docker.nix32
-rw-r--r--modules/core/virtualisation/libvirtd.nix15
-rw-r--r--modules/core/virtualisation/qemu.nix45
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
- '';
- };
-}