nixos/suites/filesystem: make use of state variables

This commit is contained in:
Gabriel Arazas 2024-09-07 22:08:00 +08:00
parent dabebb5f1d
commit afd189ab81
No known key found for this signature in database
GPG Key ID: 62104B43D00AA360

View File

@ -34,7 +34,9 @@ in
})
(lib.mkIf cfg.setups.archive.enable {
fileSystems."/mnt/archives" = {
state.paths.archive = "/mnt/archives";
fileSystems."${config.state.paths.archive}" = {
device = "/dev/disk/by-partlabel/disk-archive-root";
fsType = "btrfs";
noCheck = true;
@ -57,7 +59,9 @@ in
})
(lib.mkIf cfg.setups.external-hdd.enable {
fileSystems."/mnt/external-storage" = {
state.paths.external-hdd = "/mnt/external-storage";
fileSystems."${config.state.paths.external-hdd}" = {
device = "/dev/disk/by-partlabel/disk-live-installer-root";
fsType = "btrfs";
noCheck = true;