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;
|
2025-01-21 11:05:08 +00:00
|
|
|
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
|
2025-01-21 11:05:08 +00:00
|
|
|
if fsType == "btrfs" && encrypted then luks
|
|
|
|
else basic
|