From ee098cdc281ba2457a0d3014cc80c6a41cce98f5 Mon Sep 17 00:00:00 2001 From: 514fpv Date: Sat, 10 Feb 2024 00:23:47 +0800 Subject: [PATCH] refactor(eientei): convert to global split zfs --- spec/eientei/default.nix | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/spec/eientei/default.nix b/spec/eientei/default.nix index 7ebf418f..a59baa1e 100644 --- a/spec/eientei/default.nix +++ b/spec/eientei/default.nix @@ -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"