From 8823cd9b36a60d3817ad9083cd79280c50dcc874 Mon Sep 17 00:00:00 2001 From: Katherina Walshe-Grey Date: Tue, 8 Oct 2024 10:54:02 +0100 Subject: [PATCH] kilgharrah: move all zfs dataset declarations to one place --- hosts/kilgharrah/default.nix | 11 ----------- hosts/kilgharrah/filesystems.nix | 32 ++++++++++++++++++++++++++------ hosts/kilgharrah/ftp.nix | 5 ----- 3 files changed, 26 insertions(+), 22 deletions(-) diff --git a/hosts/kilgharrah/default.nix b/hosts/kilgharrah/default.nix index 3d0129c..eb7bf49 100644 --- a/hosts/kilgharrah/default.nix +++ b/hosts/kilgharrah/default.nix @@ -44,17 +44,6 @@ dataDir = "/srv/music"; }; - randomcat.services.zfs.datasets = { - "rpool_albion/data" = { mountpoint = "none"; }; - "rpool_albion/data/steam" = { mountpoint = "/home/qenya/.local/share/Steam"; }; - "rpool_albion/state" = { mountpoint = "none"; }; - "rpool_albion/state/jellyfin" = { mountpoint = "/var/lib/jellyfin"; }; - "rpool_albion/state/navidrome" = { mountpoint = "/var/lib/navidrome"; }; - "rpool_albion/srv" = { mountpoint = "none"; }; - "rpool_albion/srv/jellyfin" = { mountpoint = "/srv/jellyfin"; }; - "rpool_albion/srv/music" = { mountpoint = "/srv/music"; }; - }; - system.stateVersion = "24.05"; } diff --git a/hosts/kilgharrah/filesystems.nix b/hosts/kilgharrah/filesystems.nix index a1d990c..b69c72e 100644 --- a/hosts/kilgharrah/filesystems.nix +++ b/hosts/kilgharrah/filesystems.nix @@ -1,16 +1,12 @@ { config, lib, pkgs, ... }: { + # SSD on board + boot.initrd.luks.devices = { "cryptroot".device = "/dev/disk/by-uuid/b414aaba-0a36-4135-a7e1-dc9489286acd"; }; - environment.etc.crypttab.text = '' - albion UUID=acda0e7a-069f-47c7-8e37-ec00e7cdde0f /root/luks-albion.key - ''; - - boot.supportedFilesystems = [ "ntfs" ]; # for USB drives - fileSystems = { "/" = { device = "/dev/disk/by-uuid/ad4cbc18-8849-40ed-b0bf-097f8f46346b"; @@ -68,4 +64,28 @@ device = "/swap/swapfile"; size = 32 * 1024; }]; + + + # HDD in bay + + environment.etc.crypttab.text = '' + albion UUID=acda0e7a-069f-47c7-8e37-ec00e7cdde0f /root/luks-albion.key + ''; + + randomcat.services.zfs.datasets = { + "rpool_albion/data" = { mountpoint = "none"; }; + "rpool_albion/data/steam" = { mountpoint = "/home/qenya/.local/share/Steam"; }; + "rpool_albion/state" = { mountpoint = "none"; }; + "rpool_albion/state/jellyfin" = { mountpoint = "/var/lib/jellyfin"; }; + "rpool_albion/state/navidrome" = { mountpoint = "/var/lib/navidrome"; }; + "rpool_albion/srv" = { mountpoint = "none"; }; + "rpool_albion/srv/ftp" = { mountpoint = "/srv/ftp"; }; + "rpool_albion/srv/jellyfin" = { mountpoint = "/srv/jellyfin"; }; + "rpool_albion/srv/music" = { mountpoint = "/srv/music"; }; + }; + + + # Other + + boot.supportedFilesystems = [ "ntfs" ]; # for USB drives } diff --git a/hosts/kilgharrah/ftp.nix b/hosts/kilgharrah/ftp.nix index 23fe390..4164679 100644 --- a/hosts/kilgharrah/ftp.nix +++ b/hosts/kilgharrah/ftp.nix @@ -1,11 +1,6 @@ { config, lib, pkgs, ... }: { - randomcat.services.zfs.datasets = { - "rpool_albion/srv" = { mountpoint = "none"; }; - "rpool_albion/srv/ftp" = { mountpoint = "/srv/ftp"; }; - }; - age.secrets.ftp-userDb-qenya = { # To update this, see the nixos docs for services.vsftpd.userDbPath. Note # that the command it gives to create a userDb, if applied to an *existing*