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