final-finally?
This commit is contained in:
parent
cbd55764b7
commit
f98a761db3
@ -11,16 +11,27 @@
|
||||
networking.hostName = "nix-nas";
|
||||
networking.hostId = "39373132"; # via: head -c4 /etc/machine-id | od -An -tx4
|
||||
|
||||
fileSystems = {
|
||||
"/nix" = {
|
||||
device = "rpool/nix";
|
||||
fileSystems."/" =
|
||||
{ device = "rpool/root";
|
||||
fsType = "zfs";
|
||||
};
|
||||
"/home" = {
|
||||
device = "rpool/home";
|
||||
|
||||
fileSystems."/nix" =
|
||||
{ device = "rpool/nix";
|
||||
fsType = "zfs";
|
||||
};
|
||||
};
|
||||
|
||||
fileSystems."/home" =
|
||||
{ device = "tank/home";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
fileSystems."/tank" =
|
||||
{ device = "tank/media";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
users.users.nicole = {
|
||||
isNormalUser = true;
|
||||
|
43
disko.nix
43
disko.nix
@ -11,7 +11,7 @@
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
size = "512M"; type = "EF00";
|
||||
size = "1G"; type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
@ -20,11 +20,11 @@
|
||||
};
|
||||
};
|
||||
rpool = {
|
||||
size = "60G"; type = "BF00";
|
||||
size = "60G";
|
||||
content = { type = "zfs"; pool = "rpool"; };
|
||||
};
|
||||
tank = {
|
||||
type = "BF00";
|
||||
size = "100%";
|
||||
content = { type = "zfs"; pool = "tank"; };
|
||||
};
|
||||
};
|
||||
@ -34,20 +34,25 @@
|
||||
zpool.rpool = {
|
||||
type = "zpool";
|
||||
options = { ashift = "12"; autotrim = "on"; };
|
||||
rootFsOptions = {
|
||||
compression = "zstd";
|
||||
};
|
||||
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^rpool@blank$' || zfs snapshot rpool@blank";
|
||||
|
||||
datasets = {
|
||||
root = {
|
||||
type = "zfs_fs";
|
||||
mountpoint = "/";
|
||||
options.compression = "zstd";
|
||||
options = {
|
||||
mountpoint = "legacy";
|
||||
compression = "zstd";
|
||||
"com.sun:auto-snapshot" = "false";
|
||||
};
|
||||
};
|
||||
nix = {
|
||||
type = "zfs_fs";
|
||||
mountpoint = "legacy";
|
||||
options.compression = "zstd";
|
||||
};
|
||||
home = {
|
||||
type = "zfs_fs";
|
||||
mountpoint = "legacy";
|
||||
mountpoint = "/nix";
|
||||
options.mountpoint = "legacy";
|
||||
options.compression = "zstd";
|
||||
};
|
||||
};
|
||||
@ -56,10 +61,20 @@
|
||||
zpool.tank = {
|
||||
type = "zpool";
|
||||
options = { ashift = "12"; autotrim = "on"; };
|
||||
datasets.media = {
|
||||
type = "zfs_fs";
|
||||
mountpoint = "/tank";
|
||||
options.compression = "zstd";
|
||||
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^tank@blank$' || zfs snapshot tank@blank";
|
||||
datasets = {
|
||||
media = {
|
||||
type = "zfs_fs";
|
||||
mountpoint = "/tank";
|
||||
options.mountpoint = "legacy";
|
||||
options.compression = "zstd";
|
||||
};
|
||||
home = {
|
||||
type = "zfs_fs";
|
||||
mountpoint = "/home";
|
||||
options.mountpoint = "legacy";
|
||||
options.compression = "zstd";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user