added more comments to disko config
This commit is contained in:
parent
6dad7e836a
commit
2be4a5df9d
20
disko.nix
20
disko.nix
|
@ -8,12 +8,14 @@
|
|||
disko.devices = {
|
||||
disk =
|
||||
{
|
||||
# Main SSD where /nix/store /etc /boot etc. is located.
|
||||
main = {
|
||||
type = "disk";
|
||||
device = root-disk;
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
# Define a 512 megabyte boot partition
|
||||
boot = {
|
||||
size = "512M";
|
||||
type = "EF00";
|
||||
|
@ -24,6 +26,7 @@
|
|||
mountOptions = ["umask=0077"];
|
||||
};
|
||||
};
|
||||
# If the swap argument is defined then create a swap partition of the given size
|
||||
swap = lib.mkIf (swap-size != -1) {
|
||||
size = swap-size;
|
||||
content = {
|
||||
|
@ -32,6 +35,7 @@
|
|||
resumeDevice = true;
|
||||
};
|
||||
};
|
||||
# Finally allocate the rest of the disk as a zfs device
|
||||
root = {
|
||||
size = "100%";
|
||||
content = {
|
||||
|
@ -62,12 +66,13 @@
|
|||
});
|
||||
|
||||
zpool = {
|
||||
# Set up zroot pool
|
||||
zroot = {
|
||||
type = "zpool";
|
||||
rootFsOptions = {
|
||||
mountpoint = "none";
|
||||
acltype = "posixacl";
|
||||
xattr = "sa";
|
||||
acltype = "posixacl"; # POSIX compliant file permissions
|
||||
xattr = "sa"; # Store attributes in inodes to reduce disk reads
|
||||
};
|
||||
|
||||
datasets = {
|
||||
|
@ -83,16 +88,17 @@
|
|||
};
|
||||
};
|
||||
|
||||
# If any disks where defined to be in the raid we set up the raid5 pool
|
||||
raid5 = lib.mkIf (builtins.length raid-disks > 0) {
|
||||
type = "zpool";
|
||||
mode = "raidz";
|
||||
|
||||
rootFsOptions = {
|
||||
compression = "zstd";
|
||||
mountpoint = "none";
|
||||
acltype = "posixacl";
|
||||
xattr = "sa";
|
||||
"com.sun:auto-snapshot" = "true";
|
||||
compression = "zstd"; # Compress filesystem for more storage
|
||||
mountpoint = "none"; # Dont mount the zfs pool anywhere
|
||||
acltype = "posixacl"; # POSIX compliant file permissions
|
||||
xattr = "sa"; # Store attributes in inodes to reduce disk reads
|
||||
"com.sun:auto-snapshot" = "true"; # Never a bad idea to have backups
|
||||
};
|
||||
|
||||
datasets = {
|
||||
|
|
Loading…
Reference in a new issue