refactor(eientei): convert to global split zfs

This commit is contained in:
514fpv 2024-02-10 00:23:47 +08:00
parent 4ba694da03
commit ee098cdc28
Signed by: koishi
SSH key fingerprint: SHA256:axz0uIzzY+5W19i7QOUuiw5LSqhKfCBKPf3L4xFRxLw

View file

@ -6,10 +6,9 @@
auth.openssh.enable = true;
fs.esp.uuid = "C368-7571";
fs.type = "zfs";
fs.zfs.externalStore = true;
fs.external.device = "/dev/disk/by-uuid/d9202e56-a14f-4342-acdb-dbae33d680fc";
fs.external.fsType = "xfs";
fs.external.options = [ "noatime" ];
fs.zfs.split.enable = true;
fs.zfs.split.store = "d9202e56-a14f-4342-acdb-dbae33d680fc";
fs.zfs.split.secret = "1404c4f1-b890-4cf0-ab8a-26bd81bd2254";
fs.cryptsetup.enable = true;
fs.cryptsetup.allowDiscards = false;
fs.cryptsetup.uuids.secret = "c33c9b18-a280-42d7-8740-3f8d3f60dc43";
@ -19,20 +18,6 @@
oci.enable = true;
};
services.fstrim.enable = true;
boot.swraid.enable = true;
boot.swraid.mdadmConf = ''
PROGRAM /usr/bin/true
'';
fileSystems."/nix/var/secret" =
{ device = "/dev/disk/by-uuid/1404c4f1-b890-4cf0-ab8a-26bd81bd2254";
fsType = "ext4";
options = [ "noatime" ];
neededForBoot = true;
depends = [ "/nix/var" ];
};
boot.initrd.systemd.services.zfs-import-eientei.after = [ "cryptsetup.target" ];
services.udev.extraRules = ''
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="80:61:5f:07:9e:2f", NAME="ix0"
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="00:e0:4c:68:bb:30", NAME="ss0"