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