diff options
author | Soispha <soispha@vhack.eu> | 2023-07-29 21:58:49 +0200 |
---|---|---|
committer | Soispha <soispha@vhack.eu> | 2023-07-30 00:19:30 +0200 |
commit | 3f5e7b952916a9198afa6bcb85f9ad15187b0a80 (patch) | |
tree | 8029c515b900eb8453a629cc9424778f0cd03859 /system/impermanence | |
parent | Style(treewide): Remove some unused imports (diff) | |
download | nixos-config-3f5e7b952916a9198afa6bcb85f9ad15187b0a80.tar.gz nixos-config-3f5e7b952916a9198afa6bcb85f9ad15187b0a80.zip |
Feat(treewide): Add enable options for secrets and impermanence
Diffstat (limited to '')
-rw-r--r-- | system/impermanence/default.nix | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/system/impermanence/default.nix b/system/impermanence/default.nix index 8e6d81fb..adbdfce2 100644 --- a/system/impermanence/default.nix +++ b/system/impermanence/default.nix @@ -1,4 +1,9 @@ -{config, ...}: let +{ + config, + lib, + ... +}: let + cfg = config.soispha.impermanence; networkmanager = if config.networking.networkmanager.enable then [ @@ -23,16 +28,25 @@ ++ networkmanager ++ secureboot; in { - # needed for the hm impermanence config - programs.fuse.userAllowOther = true; + options.soispha.impermanence = { + enable = lib.mkOption { + type = lib.types.bool; + default = true; + description = lib.mdDoc "Disk setup with disko"; + }; + }; + config = lib.mkIf cfg.enable { + # needed for the hm impermanence config + programs.fuse.userAllowOther = true; - environment.persistence = { - "/srv" = { - hideMounts = true; - inherit directories; - files = [ - "/etc/machine-id" - ]; + environment.persistence = { + "/srv" = { + hideMounts = true; + inherit directories; + files = [ + "/etc/machine-id" + ]; + }; }; }; } |