disko: fix zfs mountpoints

This commit is contained in:
Sandro - 2023-05-21 21:12:56 +02:00
parent 0a7bdbb3ee
commit 5e1a871c7e
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5
1 changed files with 8 additions and 10 deletions

View File

@ -138,6 +138,7 @@ in
datasets =
let
dataset = mountpoint: {
inherit mountpoint;
options = {
canmount = "on";
compression = "zstd";
@ -158,7 +159,8 @@ in
"data/var/backup" = dataset "/var/backup";
"data/var/lib" = dataset "/var/lib";
"data/var/log" = dataset "/var/log";
"nixos" = {
"nixos" = lib.recursiveUpdate (dataset "nixos") {
mountpoint = null;
options = {
canmount = "off";
mountpoint = "none";
@ -166,17 +168,13 @@ in
type = "zfs_fs";
};
"nixos/nix" = dataset "/nix";
"nixos/nix/store" = {
options = {
atime = "off";
canmount = "on";
mountpoint = "/nix/store";
};
type = "zfs_fs";
"nixos/nix/store" = lib.recursiveUpdate (dataset "nixos/nix/store") {
options.atime = "off";
};
"nixos/nix/var" = dataset "/nix/var";
"reserved" = {
# zfs uses copy on write and requires some free space to delete files when the disk is completely filled
# zfs uses copy on write and requires some free space to delete files when the disk is completely filled
"reserved" = lib.recursiveUpdate (dataset "reserved") {
mountpoint = null;
options = {
canmount = "off";
mountpoint = "none";