nixos-config/system/starlight/boot-config.nix

72 lines
1.8 KiB
Nix
Raw Normal View History

2024-09-03 05:03:21 +00:00
{
config,
pkgs,
...
}:
2024-03-02 03:13:17 +00:00
{
2020-04-11 21:47:33 +00:00
boot = {
2023-08-30 20:58:52 +00:00
kernelPackages = pkgs.linuxPackages_latest;
2024-03-15 20:46:12 +00:00
extraModulePackages = with config.boot.kernelPackages; [ zenpower ];
2024-03-13 18:57:49 +00:00
blacklistedKernelModules = [ "k10temp" ]; # conflicts with zenpower
2023-06-06 00:51:11 +00:00
tmp.cleanOnBoot = true;
2020-04-11 21:47:33 +00:00
2024-04-29 02:29:41 +00:00
# Buggy firmware reports absurd values after resume, just disable shutdown
2024-04-29 17:17:31 +00:00
kernelParams = [ "thermal.off=1" ];
2024-04-29 02:29:41 +00:00
# Encrypted drives
2020-04-11 21:47:33 +00:00
initrd.luks = {
reusePassphrases = true;
devices = {
2020-04-27 23:19:31 +00:00
"${config.networking.hostName}" = {
2024-09-03 01:35:39 +00:00
device = "/dev/disk/by-uuid/9e5e99e1-2869-4001-bbbb-995376d0f6b4";
2020-04-11 21:47:33 +00:00
preLVM = true;
allowDiscards = true;
bypassWorkqueues = true;
2020-04-11 21:47:33 +00:00
};
glimmer = {
2021-01-16 04:14:30 +00:00
device = "/dev/disk/by-uuid/43220fc3-2f33-4915-9365-59eb27b21719";
preLVM = true;
allowDiscards = true;
bypassWorkqueues = true;
};
2024-09-03 01:35:39 +00:00
vm-sata0 = {
device = "/dev/disk/by-uuid/e1ce7879-a6e3-4f9a-bac9-186206060f83";
preLVM = true;
allowDiscards = true;
bypassWorkqueues = true;
};
2024-09-03 01:35:39 +00:00
vm-nvme0 = {
device = "/dev/disk/by-uuid/9a9459fa-1b98-40b9-9ba9-66f2ee3b8108";
preLVM = true;
allowDiscards = true;
bypassWorkqueues = true;
};
2020-04-11 21:47:33 +00:00
};
};
};
2021-01-15 19:27:51 +00:00
2024-09-03 01:35:39 +00:00
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;
};
2022-02-01 07:00:28 +00:00
2024-09-03 05:03:21 +00:00
environment.etc."lvm/lvm.conf".text = ''
global/thin_restore_executable = ${pkgs.thin-provisioning-tools}/bin/thin_restore
'';
2022-02-01 07:00:28 +00:00
services.btrfs.autoScrub = {
enable = true;
2024-03-02 03:13:17 +00:00
fileSystems = [
"/media/data"
];
2022-02-01 07:00:28 +00:00
};
2020-04-11 21:47:33 +00:00
}