fix chungus disko config

This commit is contained in:
Ingolf Wagner 2023-04-28 12:57:48 +02:00
parent c21c6fdb09
commit 50cec47e23
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B

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,11 +54,8 @@ in
]; ];
}; };
}; };
} // mapAttrs } // builtins.mapAttrs
(name: device_path: (name: device_path: {
{
name = name;
value = {
type = "disk"; type = "disk";
device = device_path; device = device_path;
content = { content = {
@ -81,7 +78,6 @@ in
} }
]; ];
}; };
};
} }
) )
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";
}; };
}; };
}; };
}; };
}; };
}; };
} }