made impermanence work
This commit is contained in:
parent
131f730caf
commit
c28731a1a7
|
@ -48,6 +48,9 @@ in {
|
||||||
hd_18_tb_a = zfsDisk "/dev/disk/by-id/ata-ST18000NE000-3G6101_ZVTCXVEB";
|
hd_18_tb_a = zfsDisk "/dev/disk/by-id/ata-ST18000NE000-3G6101_ZVTCXVEB";
|
||||||
hd_18_tb_b = zfsDisk "/dev/disk/by-id/ata-ST18000NE000-3G6101_ZVTCXWSC";
|
hd_18_tb_b = zfsDisk "/dev/disk/by-id/ata-ST18000NE000-3G6101_ZVTCXWSC";
|
||||||
hd_18_tb_c = zfsDisk "/dev/disk/by-id/ata-ST18000NE000-3G6101_ZVTD10EH";
|
hd_18_tb_c = zfsDisk "/dev/disk/by-id/ata-ST18000NE000-3G6101_ZVTD10EH";
|
||||||
|
hd_18_tb_d = zfsDisk "/dev/disk/by-id/ata-ST18000NT001-3NF101_ZVTE0S3Q";
|
||||||
|
hd_18_tb_e = zfsDisk "/dev/disk/by-id/ata-ST18000NT001-3NF101_ZVTEF27J";
|
||||||
|
hd_18_tb_f = zfsDisk "/dev/disk/by-id/ata-ST18000NT001-3NF101_ZVTEZACV";
|
||||||
|
|
||||||
ssd_4_tb_a = cacheDisk "/dev/disk/by-id/nvme-Samsung_SSD_990_PRO_4TB_S7KGNU0X907881F";
|
ssd_4_tb_a = cacheDisk "/dev/disk/by-id/nvme-Samsung_SSD_990_PRO_4TB_S7KGNU0X907881F";
|
||||||
};
|
};
|
||||||
|
@ -59,12 +62,14 @@ in {
|
||||||
type = "topology";
|
type = "topology";
|
||||||
vdev = [
|
vdev = [
|
||||||
{
|
{
|
||||||
# should this only mirror for this inital config with 3 drives we will used raidz2 for future configs???
|
mode = "raidz2";
|
||||||
mode = "mirror";
|
|
||||||
members = [
|
members = [
|
||||||
"hd_18_tb_a"
|
"hd_18_tb_a"
|
||||||
"hd_18_tb_b"
|
"hd_18_tb_b"
|
||||||
"hd_18_tb_c"
|
"hd_18_tb_c"
|
||||||
|
"hd_18_tb_d"
|
||||||
|
"hd_18_tb_e"
|
||||||
|
"hd_18_tb_f"
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
@ -113,6 +118,15 @@ in {
|
||||||
canmount = "on";
|
canmount = "on";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
"local/system/sops" = {
|
||||||
|
type = "zfs_fs";
|
||||||
|
mountpoint = import ../../../const/sops_age_key_directory.nix;
|
||||||
|
options = {
|
||||||
|
atime = "off";
|
||||||
|
relatime = "off";
|
||||||
|
canmount = "on";
|
||||||
|
};
|
||||||
|
};
|
||||||
"local/system/root" = {
|
"local/system/root" = {
|
||||||
type = "zfs_fs";
|
type = "zfs_fs";
|
||||||
mountpoint = "/";
|
mountpoint = "/";
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
{
|
{lib, ...}: {
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
boot.initrd.postResumeCommands = lib.mkAfter ''
|
boot.initrd.postResumeCommands = lib.mkAfter ''
|
||||||
zfs rollback -r rpool/local/system/root@blank
|
zfs rollback -r rpool/local/system/root@blank
|
||||||
zfs rollback -r rpool/local/home/leyla@blank
|
zfs rollback -r rpool/local/home/leyla@blank
|
||||||
|
@ -51,6 +47,7 @@
|
||||||
fileSystems."/home/leyla".neededForBoot = true;
|
fileSystems."/home/leyla".neededForBoot = true;
|
||||||
fileSystems."/persist/system/root".neededForBoot = true;
|
fileSystems."/persist/system/root".neededForBoot = true;
|
||||||
fileSystems."/persist/home/leyla".neededForBoot = true;
|
fileSystems."/persist/home/leyla".neededForBoot = true;
|
||||||
|
fileSystems.${import ../../../const/sops_age_key_directory.nix}.neededForBoot = true;
|
||||||
|
|
||||||
environment.persistence."/persist/system/root" = {
|
environment.persistence."/persist/system/root" = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -79,7 +76,6 @@
|
||||||
];
|
];
|
||||||
files = [
|
files = [
|
||||||
"/etc/machine-id"
|
"/etc/machine-id"
|
||||||
config.environment.sessionVariables.SOPS_AGE_KEY_FILE
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue