diff --git a/flake.lock b/flake.lock
index 7853c7e..3a1c4b8 100644
--- a/flake.lock
+++ b/flake.lock
@@ -1,25 +1,5 @@
{
"nodes": {
- "NixVirt": {
- "inputs": {
- "nixpkgs": [
- "nixpkgs"
- ],
- "nixpkgs-ovmf": "nixpkgs-ovmf"
- },
- "locked": {
- "lastModified": 1712439808,
- "narHash": "sha256-QoONoZPBpNTw5cia05QSvDlaxXo3moKAJQOw7c5hMXA=",
- "rev": "9f1cdca730d92461075709e867c1e9ad93d58a8d",
- "revCount": 284,
- "type": "tarball",
- "url": "https://api.flakehub.com/f/pinned/AshleyYakeley/NixVirt/0.5.0/018eb55e-7beb-75c5-919f-5b5b26136e06/source.tar.gz"
- },
- "original": {
- "type": "tarball",
- "url": "https://flakehub.com/f/AshleyYakeley/NixVirt/%2A.tar.gz"
- }
- },
"flake-compat": {
"flake": false,
"locked": {
@@ -135,22 +115,6 @@
"type": "github"
}
},
- "nixpkgs-ovmf": {
- "locked": {
- "lastModified": 1708984720,
- "narHash": "sha256-gJctErLbXx4QZBBbGp78PxtOOzsDaQ+yw1ylNQBuSUY=",
- "owner": "NixOS",
- "repo": "nixpkgs",
- "rev": "13aff9b34cc32e59d35c62ac9356e4a41198a538",
- "type": "github"
- },
- "original": {
- "owner": "NixOS",
- "ref": "nixos-unstable",
- "repo": "nixpkgs",
- "type": "github"
- }
- },
"nixpkgs_2": {
"locked": {
"lastModified": 1733759999,
@@ -189,7 +153,6 @@
},
"root": {
"inputs": {
- "NixVirt": "NixVirt",
"home-manager": "home-manager",
"nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs",
diff --git a/flake.nix b/flake.nix
index 5844829..5f5d66a 100644
--- a/flake.nix
+++ b/flake.nix
@@ -15,13 +15,9 @@
url = "github:nix-community/NixOS-WSL/2405.5.4";
inputs.nixpkgs.follows = "nixpkgs";
};
- NixVirt = {
- url = "https://flakehub.com/f/AshleyYakeley/NixVirt/*.tar.gz";
- inputs.nixpkgs.follows = "nixpkgs";
- };
};
- outputs = { self, nixpkgs, nur, home-manager, nixos-wsl, NixVirt }:
+ outputs = { self, nixpkgs, nur, home-manager, nixos-wsl }:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
@@ -53,8 +49,6 @@
./src/system/machines/workstation
home-manager.nixosModules.home-manager
(import ./src/system/machines/workstation/modules/home-manager)
- NixVirt.nixosModules.default
- (import ./src/system/VMs)
];
};
diff --git a/src/system/VMs/default.nix b/src/system/VMs/default.nix
deleted file mode 100644
index 4ae44d6..0000000
--- a/src/system/VMs/default.nix
+++ /dev/null
@@ -1,33 +0,0 @@
-{ pkgs, lib, config, ... }:
-
-{
- virtualisation.libvirt = {
- enable = true;
- verbose = true;
-
- connections."qemu:///system" = {
- domains = [
- { definition = ./machines/Test_Bench1.xml; }
- { definition = ./machines/rtHub.xml; }
- ];
-
- pools = [
- {
- definition = ./storage/pools/default.xml;
- active = true;
- volumes = [
- { definition = ./storage/volumes/rocky9.xml; }
- { definition = ./storage/volumes/hubert.xml; }
- ];
- }
- ];
-
- networks = [
- {
- definition = ./networks/virbr0.xml;
- active = true;
- }
- ];
- };
- };
-}
diff --git a/src/system/VMs/machines/Test_Bench1.xml b/src/system/VMs/machines/Test_Bench1.xml
deleted file mode 100644
index 3e08cf6..0000000
--- a/src/system/VMs/machines/Test_Bench1.xml
+++ /dev/null
@@ -1,192 +0,0 @@
-
- Test_Bench1
- 6dab32d2-aa81-469f-a0d7-dbe4a12c2337
-
- Rocky 9.2
- Redhawk 9.2
- SimWB 2024.2-0
-
-
-
-
-
-
- 4194304
- 4194304
- 4
-
- hvm
- /run/libvirt/nix-ovmf/OVMF_CODE.fd
- /var/lib/libvirt/qemu/nvram/Test_Bench1_VARS.fd
-
-
-
-
-
-
-
-
-
-
-
-
-
- destroy
- restart
- destroy
-
-
-
-
-
- /run/libvirt/nix-emulators/qemu-system-x86_64
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- /dev/urandom
-
-
-
-
-
diff --git a/src/system/VMs/machines/rtHub.xml b/src/system/VMs/machines/rtHub.xml
deleted file mode 100644
index 25870d6..0000000
--- a/src/system/VMs/machines/rtHub.xml
+++ /dev/null
@@ -1,192 +0,0 @@
-
- rtHub
- cfd9306a-3dde-41e5-8511-b192a54a52f7
- Hubert
- Concurrent Github Project
-
-
-
-
-
- 8388608
- 8388608
- 6
-
- hvm
- /run/libvirt/nix-ovmf/OVMF_CODE.fd
- /var/lib/libvirt/qemu/nvram/rtHub_VARS.fd
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- destroy
- restart
- destroy
-
-
-
-
-
- /run/libvirt/nix-emulators/qemu-system-x86_64
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- /dev/urandom
-
-
-
-
-
diff --git a/src/system/VMs/networks/virbr0.xml b/src/system/VMs/networks/virbr0.xml
deleted file mode 100644
index f002c29..0000000
--- a/src/system/VMs/networks/virbr0.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
- default
- 14667e27-1e89-40fb-ba5a-381a6c79bd5f
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/system/VMs/storage/pools/default.xml b/src/system/VMs/storage/pools/default.xml
deleted file mode 100644
index 02bf597..0000000
--- a/src/system/VMs/storage/pools/default.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
- default
- 70edbae5-7ea6-4996-a457-bc1d450b6be4
- 536608768000
- 31873052672
- 504735715328
-
-
-
- /var/lib/libvirt/images
-
- 0711
- 0
- 0
-
-
-
-
diff --git a/src/system/VMs/storage/volumes/hubert.xml b/src/system/VMs/storage/volumes/hubert.xml
deleted file mode 100644
index bf5d94a..0000000
--- a/src/system/VMs/storage/volumes/hubert.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
- rtHub.qcow2
- /var/lib/libvirt/images/rtHub.qcow2
- 536870912000
- 536953098240
- 536953094144
-
- /var/lib/libvirt/images/rtHub.qcow2
-
-
- 0600
- 0
- 0
-
-
- 1739896304.319898704
- 1739889095.814742881
- 1739895648.059488448
- 0
-
- 1.1
- 65536
-
-
-
-
-
-
diff --git a/src/system/VMs/storage/volumes/rocky9.xml b/src/system/VMs/storage/volumes/rocky9.xml
deleted file mode 100644
index ca934d5..0000000
--- a/src/system/VMs/storage/volumes/rocky9.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
- rocky9.qcow2
- /var/lib/libvirt/images/rocky9.qcow2
- 107374182400
- 10468622336
- 107390828544
-
- /var/lib/libvirt/images/rocky9.qcow2
-
-
- 0600
- 0
- 0
-
-
- 1738001245.563436511
- 1738001224.380580475
- 1738001224.667578536
- 0
-
- 1.1
- 65536
-
-
-
-
-
-
diff --git a/src/system/machines/workstation/hardware.nix b/src/system/machines/workstation/hardware.nix
index 3aa2414..02f109c 100644
--- a/src/system/machines/workstation/hardware.nix
+++ b/src/system/machines/workstation/hardware.nix
@@ -54,6 +54,13 @@
"d /home/VMs 0755 root root"
];
+ virtualisation.libvirtd = {
+ enable = true;
+ qemu = {
+ runAsRoot = true;
+ ovmf.enable = true;
+ };
+ };
hardware = {
cpu = {
diff --git a/src/user/modules/utils/modules/dev/default.nix b/src/user/modules/utils/modules/dev/default.nix
index 4ad1361..4a89e70 100644
--- a/src/user/modules/utils/modules/dev/default.nix
+++ b/src/user/modules/utils/modules/dev/default.nix
@@ -16,8 +16,7 @@ in
qrencode
docker
- ] ++ optionals (osConfig.virtualisation ? libvirt && osConfig.virtualisation.libvirt.enable ||
- osConfig.virtualisation.libvirt.enable) [
+ ] ++ optionals (osConfig.virtualisation.libvirtd.enable) [
virt-manager
];
diff --git a/vm.configs b/vm.configs
deleted file mode 120000
index 85fc0fe..0000000
--- a/vm.configs
+++ /dev/null
@@ -1 +0,0 @@
-src/system/VMs
\ No newline at end of file