Enable ZFS

This commit is contained in:
Nathan McCarty 2023-07-03 21:14:35 -04:00
parent 0883930abe
commit 5d83b1f30e
Signed by: thatonelutenist
SSH Key Fingerprint: SHA256:hwQEcmak9E6sdU9bXc98RHw/Xd1AhpB5HZT7ZSVJkRM
2 changed files with 15 additions and 0 deletions

View File

@ -94,4 +94,10 @@ in {
enable = true; enable = true;
package = unstable.vmware-workstation; 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";
} }

View File

@ -8,6 +8,9 @@ let
"10de:1ad9" # Usb ???? "10de:1ad9" # Usb ????
]; ];
in { in {
##
## Kernel configuration
##
boot = { boot = {
kernelParams = [ kernelParams = [
# enable iommu # enable iommu
@ -19,17 +22,23 @@ in {
initrd.kernelModules = [ "vfio_pci" "vfio" "vfio_iommu_type1" ]; initrd.kernelModules = [ "vfio_pci" "vfio" "vfio_iommu_type1" ];
}; };
##
## Virtualization setup
##
environment.systemPackages = with pkgs; [ looking-glass-client ]; environment.systemPackages = with pkgs; [ looking-glass-client ];
virtualisation.spiceUSBRedirection.enable = true; virtualisation.spiceUSBRedirection.enable = true;
virtualisation.libvirtd = { virtualisation.libvirtd = {
qemu = { qemu = {
# Enable tpm for windows 11
swtpm.enable = true; swtpm.enable = true;
ovmf = { ovmf = {
enable = true; enable = true;
# Needed for secure boot
packages = [ pkgs.OVMFFull.fd ]; packages = [ pkgs.OVMFFull.fd ];
}; };
}; };
}; };
# Looking glass shared memory
systemd.tmpfiles.rules = systemd.tmpfiles.rules =
[ "f /dev/shm/looking-glass 0660 nathan qemu-libvirtd -" ]; [ "f /dev/shm/looking-glass 0660 nathan qemu-libvirtd -" ];