From 51f9b93704df26d9a99d1cd71ecb061e0483b052 Mon Sep 17 00:00:00 2001 From: Daniel Langbein Date: Wed, 27 Sep 2023 11:58:21 +0200 Subject: [PATCH] yodaNas LUKS backup drive --- hosts/yodaNas/configuration.nix | 3 ++- hosts/yodaNas/hardware-configuration.nix | 30 +++++++++++++++--------- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/hosts/yodaNas/configuration.nix b/hosts/yodaNas/configuration.nix index d480215..5bfefc7 100644 --- a/hosts/yodaNas/configuration.nix +++ b/hosts/yodaNas/configuration.nix @@ -67,6 +67,7 @@ in # TODO: For "/" this cfg resides in base.nix fileSystems = { - "/mnt/data".options = [ "compress=zstd" "noatime" "commit=120" ]; + "/mnt/data".options = [ "compress=zstd" "noatime" "commit=120" ]; + "/mnt/backup".options = [ "compress=zstd" "noatime" "commit=120" ]; }; } diff --git a/hosts/yodaNas/hardware-configuration.nix b/hosts/yodaNas/hardware-configuration.nix index 1ea57de..98546dd 100644 --- a/hosts/yodaNas/hardware-configuration.nix +++ b/hosts/yodaNas/hardware-configuration.nix @@ -21,23 +21,17 @@ boot.initrd.luks.devices."luks-3d974bd0-f373-469b-8e9c-2d5516e9f0f5".device = "/dev/disk/by-uuid/3d974bd0-f373-469b-8e9c-2d5516e9f0f5"; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/072E-897D"; - fsType = "vfat"; - }; - -# fileSystems."/var/lib/docker/btrfs" = -# { device = "/@/var/lib/docker/btrfs"; -# fsType = "none"; -# options = [ "bind" ]; -# }; - fileSystems."/swap" = { device = "/dev/disk/by-uuid/b02e7bc6-62e0-46b5-8d5f-869b464c4491"; fsType = "btrfs"; options = [ "subvol=@swap" ]; }; + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/072E-897D"; + fsType = "vfat"; + }; + fileSystems."/mnt/data" = { device = "/dev/disk/by-uuid/c385a436-0288-486f-a2b9-c64c2db667e7"; fsType = "btrfs"; @@ -45,6 +39,20 @@ boot.initrd.luks.devices."12tb1".device = "/dev/disk/by-uuid/68c349e8-5118-4773-9fd5-5dbad9acee4e"; +# fileSystems."/var/lib/docker/btrfs" = +# { device = "/swap/@/var/lib/docker/btrfs"; +# fsType = "none"; +# options = [ "bind" ]; +# }; + + fileSystems."/mnt/backup" = + { device = "/dev/disk/by-uuid/a454430b-dee3-4b6b-8325-f7bdb9435ed1"; + fsType = "btrfs"; + }; + + boot.initrd.luks.devices."3tb1".device = "/dev/disk/by-uuid/20d86155-30d4-404c-95e8-c701cfb16ca5"; + boot.initrd.luks.devices."3tb2".device = "/dev/disk/by-uuid/4651c3f1-e4b8-45aa-a823-df762530a307"; + swapDevices = [ { device = "/swap/swapfile"; } ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking