blob: b13098bbf72dc2632a34f5b747293a9b428f70b4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
{
pkgs,
...
}:
{
services.fstrim.enable = true;
services.zfs = {
trim.enable = true;
autoScrub = {
enable = true;
pools = [ "zpool" ];
interval = "weekly";
randomizedDelaySec = "6h";
};
};
networking.hostId = "41ba28ff";
boot = {
plymouth.enable = false;
tmp.useTmpfs = true;
};
# unlock over ssh
boot.initrd.network = {
enable = true;
ssh = {
enable = true;
port = 2222;
hostKeys = [ /etc/secrets/initrd/ssh_host_rsa_key ];
authorizedKeys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJl9iYG5oHBq/poBn7Jf1/FGWWbAnbx+NKjs7qtT3uAK 0xa@toaster 2024-12-31"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAXrwZsBChUhVuF5gFEfj8GwQlnrqEttAytS5jVCfuE4 0xa@frituurpan"
];
};
postCommands = ''
zpool import -a
echo "zfs load-key -a; killall zfs" >> /root/.profile
'';
};
# support for network
boot.initrd.kernelModules = [
"igc"
"i40e"
"mt7921e"
];
boot.kernelModules = [
"igc"
"i40e"
"mt7921e"
];
}
|