{ config, pkgs, ... }: { boot = { kernelPackages = pkgs.linuxPackages_latest; extraModulePackages = with config.boot.kernelPackages; [ zenpower ]; blacklistedKernelModules = [ "k10temp" ]; # conflicts with zenpower tmp.cleanOnBoot = true; # Buggy firmware reports absurd values after resume, just disable shutdown kernelParams = [ "thermal.off=1" ]; # Encrypted drives initrd.luks = { reusePassphrases = true; devices = { "${config.networking.hostName}" = { device = "/dev/disk/by-uuid/9e5e99e1-2869-4001-bbbb-995376d0f6b4"; preLVM = true; allowDiscards = true; bypassWorkqueues = true; }; glimmer = { device = "/dev/disk/by-uuid/43220fc3-2f33-4915-9365-59eb27b21719"; preLVM = true; allowDiscards = true; bypassWorkqueues = true; }; vm-sata0 = { device = "/dev/disk/by-uuid/e1ce7879-a6e3-4f9a-bac9-186206060f83"; preLVM = true; allowDiscards = true; bypassWorkqueues = true; }; vm-nvme0 = { device = "/dev/disk/by-uuid/9a9459fa-1b98-40b9-9ba9-66f2ee3b8108"; preLVM = true; allowDiscards = true; bypassWorkqueues = true; }; }; }; }; fileSystems."/media/luna".options = [ "x-systemd.automount" "noauto" "x-systemd.idle-timeout=60" "x-systemd.device-timeout=5s" "x-systemd.mount-timeout=5s" ]; services.lvm = { dmeventd.enable = true; boot.thin.enable = true; }; environment.etc."lvm/lvm.conf".text = '' global/thin_restore_executable = ${pkgs.thin-provisioning-tools}/bin/thin_restore ''; services.btrfs.autoScrub = { enable = true; fileSystems = [ "/media/data" ]; }; }