From 5d83b1f30e12b4042524145d13985792bd6f63b9 Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Mon, 3 Jul 2023 21:14:35 -0400 Subject: [PATCH] Enable ZFS --- machines/levitation/configuration.nix | 6 ++++++ machines/levitation/passthrough.nix | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/machines/levitation/configuration.nix b/machines/levitation/configuration.nix index 8faa9c0..fddbcbe 100644 --- a/machines/levitation/configuration.nix +++ b/machines/levitation/configuration.nix @@ -94,4 +94,10 @@ in { enable = true; package = unstable.vmware-workstation; }; + + # ZFS + boot.supportedFilesystems = [ "zfs" ]; + boot.zfs.forceImportRoot = false; + # Generated with head -c4 /dev/urandom | od -A none -t x4 + networking.hostId = "bc94e9d3"; } diff --git a/machines/levitation/passthrough.nix b/machines/levitation/passthrough.nix index 68a1617..227b0e9 100644 --- a/machines/levitation/passthrough.nix +++ b/machines/levitation/passthrough.nix @@ -8,6 +8,9 @@ let "10de:1ad9" # Usb ???? ]; in { + ## + ## Kernel configuration + ## boot = { kernelParams = [ # enable iommu @@ -19,17 +22,23 @@ in { initrd.kernelModules = [ "vfio_pci" "vfio" "vfio_iommu_type1" ]; }; + ## + ## Virtualization setup + ## environment.systemPackages = with pkgs; [ looking-glass-client ]; virtualisation.spiceUSBRedirection.enable = true; virtualisation.libvirtd = { qemu = { + # Enable tpm for windows 11 swtpm.enable = true; ovmf = { enable = true; + # Needed for secure boot packages = [ pkgs.OVMFFull.fd ]; }; }; }; + # Looking glass shared memory systemd.tmpfiles.rules = [ "f /dev/shm/looking-glass 0660 nathan qemu-libvirtd -" ];