{ config, lib, pkgs, ... }: { # Boot configuration boot = { # Set sysctl tunables kernel.sysctl = { # Increase max inotify watches for Dropbox "fs.inotify.max_user_watches" = 100000; # Enable IPv4 forwarding "net.ipv4.ip_forward" = 1; # Enable IPv6 forwarding "net.ipv6.conf.all.forwarding" = 1; # Enable memory overcommitting "vm.overcommit_memory" = 1; # Disable swapping "vm.swappiness" = 0; }; # Run latest ZFS-compatible kernel kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages; # Disable vendor logo kernelParams = [ "fbcon=nodefer" "video=efifb:nobgrt" ]; # Use the systemd-boot EFI boot loader loader = { efi.canTouchEfiVariables = true; grub.copyKernels = true; # Limit number of generations in boot menu to prevent filling /boot systemd-boot = { configurationLimit = 20; enable = true; }; }; # Enable ZFS support supportedFilesystems = [ "ext4" "zfs" ]; }; }