nixos/hosts/common/disks/default.nix

9 lines
341 B
Nix
Raw Normal View History

2024-06-28 20:21:27 +01:00
{ device, fsType, encrypted, impermanence, ... }:
2024-05-27 15:04:34 +01:00
let
2024-06-28 20:21:27 +01:00
fsModule = if impermanence then ./${fsType}/persist.nix else ./${fsType}/standard.nix;
basic = import ./basic.nix { inherit device; fsModule = fsModule; };
2024-06-28 20:21:27 +01:00
luks = import ./luks.nix { inherit device; fsModule = fsModule; };
2024-05-27 15:04:34 +01:00
in
if fsType == "btrfs" && encrypted then luks
else basic