~poptart/ptvm

86a522e6bf04977d778be73e6b47fd2f4ab116dc — poptart 11 months ago 1f2100a main
Added ZFS template from proof-of-concept for reference
1 files changed, 38 insertions(+), 0 deletions(-)

M zfs.nix
M zfs.nix => zfs.nix +38 -0
@@ 0,0 1,38 @@
{ config, pkgs, ... }:

{ 
  #systemd.services.zfs-mount.enable = true;
  boot = {
  	supportedFilesystems = [ "zfs" ];
  	kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
  	#initrd.postDeviceCommands = ''
        #	#zpool import pentest
        #	zfs load-key -L "file:///etc/zfs/user_key" pentest/home
        #'';
	#loader.efi.efiSysMountPoint = "/boot/efi";
	#loader.efi.canTouchEfiVariables = false;
	#loader.generationsDir.copyKernels = true;
	#loader.grub.efiInstallAsRemovable = true;
	#loader.grub.copyKernels = true;
	#loader.grub.efiSupport = true;
	loader.grub.zfsSupport = true;
	#loader.grub.extraPrepareConfig = ''
	#  mkdir -p /boot/efis
	#  for i in  /boot/efis/*; do mount $i ; done
	#
	#  mkdir -p /boot/efi
	#  mount /boot/efi
	#'';
	#loader.grub.extraInstallCommands = ''
	#ESP_MIRROR=$(mktemp -d)
	#cp -r /boot/efi/EFI $ESP_MIRROR
	#for i in /boot/efis/*; do
	# cp -r $ESP_MIRROR/EFI $i
	#done
	#rm -rf $ESP_MIRROR
	#'';
  };


  #networking.hostId = "$(head -c 8 /etc/machine-id)";
}