2023-08-30 20:58:52 +00:00
|
|
|
{ config, pkgs, ... }:
|
2021-01-15 19:27:51 +00:00
|
|
|
let
|
2023-08-26 23:00:18 +00:00
|
|
|
net_opts = [
|
|
|
|
"x-systemd.automount"
|
|
|
|
"noauto"
|
|
|
|
"x-systemd.idle-timeout=60"
|
|
|
|
"x-systemd.device-timeout=5s"
|
|
|
|
"x-systemd.mount-timeout=5s"
|
|
|
|
];
|
2024-03-02 03:13:17 +00:00
|
|
|
in
|
|
|
|
{
|
2020-04-11 21:47:33 +00:00
|
|
|
boot = {
|
2023-08-30 20:58:52 +00:00
|
|
|
kernelPackages = pkgs.linuxPackages_latest;
|
2024-03-13 18:57:49 +00:00
|
|
|
extraModulePackages = with config.boot.kernelPackages; [
|
|
|
|
v4l2loopback
|
|
|
|
zenpower
|
|
|
|
];
|
|
|
|
blacklistedKernelModules = [ "k10temp" ]; # conflicts with zenpower
|
2023-06-06 00:51:11 +00:00
|
|
|
tmp.cleanOnBoot = true;
|
2020-04-11 21:47:33 +00:00
|
|
|
|
2020-11-26 04:17: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}" = {
|
2020-04-11 21:47:33 +00:00
|
|
|
device = "/dev/disk/by-uuid/274ec302-20b7-43bf-aa72-895ffdd96919";
|
|
|
|
preLVM = true;
|
|
|
|
allowDiscards = true;
|
2024-03-10 20:34:30 +00:00
|
|
|
bypassWorkqueues = true;
|
2020-04-11 21:47:33 +00:00
|
|
|
};
|
2020-05-24 21:03:53 +00:00
|
|
|
glimmer = {
|
2021-01-16 04:14:30 +00:00
|
|
|
device = "/dev/disk/by-uuid/43220fc3-2f33-4915-9365-59eb27b21719";
|
2020-05-24 21:03:53 +00:00
|
|
|
preLVM = true;
|
|
|
|
allowDiscards = true;
|
2024-03-10 20:34:30 +00:00
|
|
|
bypassWorkqueues = true;
|
|
|
|
};
|
|
|
|
badssd = {
|
|
|
|
device = "/dev/disk/by-uuid/e1ce7879-a6e3-4f9a-bac9-186206060f83";
|
|
|
|
preLVM = true;
|
|
|
|
allowDiscards = true;
|
|
|
|
bypassWorkqueues = true;
|
2020-05-24 21:03:53 +00:00
|
|
|
};
|
2020-04-11 21:47:33 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2021-01-15 19:27:51 +00:00
|
|
|
|
2021-01-16 04:14:30 +00:00
|
|
|
fileSystems."/media/luna/media".options = net_opts;
|
|
|
|
fileSystems."/media/luna/photos".options = net_opts;
|
|
|
|
fileSystems."/media/luna/games".options = net_opts;
|
2021-01-23 19:00:13 +00:00
|
|
|
fileSystems."/media/luna/private".options = net_opts;
|
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
|
|
|
}
|