summaryrefslogtreecommitdiff
path: root/hosts/bibus-lab/disko.nix
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/bibus-lab/disko.nix')
-rw-r--r--hosts/bibus-lab/disko.nix111
1 files changed, 73 insertions, 38 deletions
diff --git a/hosts/bibus-lab/disko.nix b/hosts/bibus-lab/disko.nix
index 5d0f0b8..6ca17b9 100644
--- a/hosts/bibus-lab/disko.nix
+++ b/hosts/bibus-lab/disko.nix
@@ -2,7 +2,8 @@
disko.devices = {
main = {
type = "disk";
- device = "/dev/disk/by-id/";
+ # TODO fill id
+ device = "/dev/disk/by-id/CHANGEME";
content = {
type = "gpt";
partitions = {
@@ -10,7 +11,7 @@
size = "2G";
type = "EF00";
content = {
- type = "flesystem";
+ type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
@@ -27,7 +28,8 @@
};
hdd1 = {
type = "disk";
- device = "/dev/disk/by-id/";
+ # TODO fill id
+ device = "/dev/disk/by-id/CHANGEME";
content = {
type = "gpt";
partitions = {
@@ -43,7 +45,8 @@
};
hdd2 = {
type = "disk";
- device = "/dev/disk/by-id/";
+ # TODO fill id
+ device = "/dev/disk/by-id/CHANGEME";
content = {
type = "gpt";
partitions = {
@@ -59,7 +62,8 @@
};
hdd3 = {
type = "disk";
- device = "/dev/disk/by-id/";
+ # TODO fill id
+ device = "/dev/disk/by-id/CHANGEME";
content = {
type = "gpt";
partitions = {
@@ -80,11 +84,11 @@
datasets = {
"rpool" = {
type = "zfs_fs";
- options.mountpoint = "none";
- encryption = "aes-256-gcm";
- keyformat = "raw";
- keylocation = "file:///mnt/zroot.key";
options = {
+ encryption = "on";
+ keyformat = "passphrase";
+ keylocation = "prompt";
+ mountpoint = "none";
compression = "zstd";
atime = "off";
};
@@ -92,10 +96,12 @@
"rpool/root" = {
type = "zfs_fs";
mountpoint = "/";
+ options.mountpoint = "legacy";
};
"rpool/nix" = {
type = "zfs_fs";
mountpoint = "/nix";
+ options.mountpoint = "legacy";
};
"rpool/home" = {
type = "zfs_fs";
@@ -104,32 +110,61 @@
"rpool/log" = {
type = "zfs_fs";
mountpoint = "/var/log";
+ options.mountpoint = "legacy";
};
- "rpool/var/systemd" = {
+ "rpool/var" = {
type = "zfs_fs";
- mountpoint = "/var/lib/systemd";
+ options.mountpoint = "none";
};
"rpool/var/acme" = {
type = "zfs_fs";
mountpoint = "/var/lib/acme";
};
- "rpool/docker" = {
+ "rpool/containers" = {
type = "zfs_fs";
mountpoint = "/var/lib/containers";
};
- "rpool/appdata/configs" = {
+ "rpool/appdata" = {
type = "zfs_fs";
- mountpoint = "/var/lib/appdata/configs";
+ options.mountpoint = "none";
};
- "rpool/appdata/databases" = {
+ "rpool/appdata/cfg" = {
type = "zfs_fs";
- mountpoint = "/var/lib/appdata/databases";
- options.recordsize = "16K";
+ mountpoint = "/var/lib/appdata/cfg";
+ };
+ "rpool/appdata/db" = {
+ type = "zfs_fs";
+ mountpoint = "/var/lib/appdata/db";
+ options.canmount = "off";
+ };
+ "rpool/appdata/db/postgres" = {
+ type = "zfs_fs";
+ mountpoint = "/var/lib/appdata/db/postgres";
+ options = {
+ recordsize = "8K";
+ logbias = "latency";
+ };
+ };
+ "rpool/appdata/db/couchdb" = {
+ type = "zfs_fs";
+ mountpoint = "/var/lib/appdata/db/couchdb";
+ options.recordsize = "64K";
+ };
+ "rpool/appdata/db/redis" = {
+ type = "zfs_fs";
+ mountpoint = "/var/lib/appdata/db/redis";
+ options = {
+ recordsize = "128K";
+ compression = "lz4";
+ };
};
"rpool/appdata/monero" = {
type = "zfs_fs";
mountpoint = "/var/lib/monero";
- options.recordsize = "8K";
+ options = {
+ compression = "off";
+ recordsize = "8K";
+ };
};
"rpool/appdata/mail" = {
type = "zfs_fs";
@@ -154,10 +189,10 @@
"ztank" = {
type = "zfs_fs";
mountpoint = "none";
- encryption = "aes-256-gcm";
- keyformat = "raw";
- keylocation = "file:///mnt/ztank.key";
options = {
+ encryption = "on";
+ keyformat = "passphrase";
+ keylocation = "prompt";
compression = "zstd";
atime = "off";
};
@@ -173,39 +208,39 @@
"ztank/vault" = {
type = "zfs_fs";
mountpoint = "/data/vault";
+ options.xattr = "sa";
};
- "ztank/vault/seafile" = {
+ "ztank/seafile" = {
type = "zfs_fs";
- mountpoint = "/data/vault/seafile";
- options.recordsize = "1M";
+ mountpoint = "none";
+ options.recordsize = "128K";
};
- "ztank/vault/seafile/personal" = {
+ "ztank/seafile/personal" = {
type = "zfs_fs";
- mountpoint = "/data/vault/seafile/personal";
+ mountpoint = "/data/seafile/personal";
};
- "ztank/vault/seafile/shared" = {
+ "ztank/seafile/shared" = {
type = "zfs_fs";
- mountpoint = "/data/vault/seafile/shared";
+ mountpoint = "/data/seafile/shared";
refquota = "1T";
};
- "ztank/downloads/active" = {
+ "ztank/dl" = {
type = "zfs_fs";
- mountpoint = "/data/downloads/active";
- options.recordsize = "16K";
+ options.mountpoint = "none";
};
- "ztank/downloads/complete" = {
+ "ztank/dl/active" = {
type = "zfs_fs";
- mountpoint = "/data/downloads/complete";
- options.recordsize = "1M";
+ mountpoint = "/data/dl/active";
+ options.recordsize = "16K";
};
- "ztank/cctv" = {
+ "ztank/dl/complete" = {
type = "zfs_fs";
- mountpoint = "/data/cctv";
+ mountpoint = "/data/dl/complete";
options.recordsize = "1M";
};
- "ztank/backups" = {
+ "ztank/backup" = {
type = "zfs_fs";
- mountpoint = "/data/backups";
+ mountpoint = "/data/backup";
options.recordsize = "1M";
};
};