fix chungus disko config

feature/nixinite
Ingolf Wagner 2023-04-28 12:57:48 +02:00
parent c21c6fdb09
commit 50cec47e23
Signed by: palo
GPG Key ID: 76BF5F1928B9618B
1 changed files with 30 additions and 34 deletions

View File

@ -3,7 +3,7 @@
# nixos-generate-config --root /mnt/ # nixos-generate-config --root /mnt/
# vim /mnt/configuration.nix # vim /mnt/configuration.nix
# nixos-install --root /mnt # nixos-install --root /mnt
{ ... }:
let let
raid_disks = { raid_disks = {
"TOSHIBA_1360A003FVGG" = "/dev/disk/by-id/ata-TOSHIBA_MG08ACA16TE_1360A003FVGG"; "TOSHIBA_1360A003FVGG" = "/dev/disk/by-id/ata-TOSHIBA_MG08ACA16TE_1360A003FVGG";
@ -54,35 +54,31 @@ in
]; ];
}; };
}; };
} // mapAttrs } // builtins.mapAttrs
(name: device_path: (name: device_path: {
{ type = "disk";
name = name; device = device_path;
value = { content = {
type = "disk"; type = "table";
device = device_path; format = "gpt";
content = { partitions = [
type = "table"; {
format = "gpt"; name = "zfs";
partitions = [ start = "0";
{ end = "100%";
name = "zfs"; content = {
start = "0"; type = "luks";
end = "100%"; name = "raid_${name}";
content = { #keyFile = "/tmp/secret.key";
type = "luks"; content = {
name = "raid_${name}"; type = "zfs";
#keyFile = "/tmp/secret.key"; pool = "zraid";
content = { };
type = "zfs"; };
pool = "zraid"; }
}; ];
}; };
} }
];
};
};
}
) )
raid_disks; raid_disks;
@ -90,11 +86,11 @@ in
zroot = { zroot = {
type = "zpool"; type = "zpool";
rootFsOptions.compression = "lz4";
datasets = { datasets = {
"root" = { "root" = {
type = "zfs_fs"; type = "zfs_fs";
mountpoint = "/"; mountpoint = "/";
options.compression = "lz4";
}; };
}; };
}; };
@ -106,23 +102,23 @@ in
"media" = { "media" = {
type = "zfs_fs"; type = "zfs_fs";
mountpoint = "/media"; mountpoint = "/media";
options.compression = "lz4";
}; };
"media/nextcloud" = { "media/nextcloud" = {
type = "zfs_fs"; type = "zfs_fs";
mountpoint = "/media/nextcloud"; mountpoint = "/media/nextcloud";
options = { options = {
compression = "lz4";
# question: is that combination of frequency and keep even possible? # question: is that combination of frequency and keep even possible?
"com.sun:auto-snapshot" = "false"; "com.sun:auto-snapshot" = "false";
"com.sun:auto-snapshot:daily,keep=32" = "true"; "com.sun:auto-snapshot:daily,keep=32" = "true";
"com.sun:auto-snapshot:weekly,keep=52" = "true"; "com.sun:auto-snapshot:montly,keep=48" = "true";
"com.sun:auto-snapshot:montly,keep=24" = "true";
}; };
}; };
}; };
}; };
}; };
}; };
} }