From 0e25b17f4b59f9d26c1cd3e252f6865e53c6be5c Mon Sep 17 00:00:00 2001 From: Jordan Isaacs Date: Mon, 8 Nov 2021 16:36:09 -0500 Subject: [PATCH] added mount option --- module/default.nix | 8 +++++++- options.md | 10 ++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/module/default.nix b/module/default.nix index cf68558..cf77a03 100644 --- a/module/default.nix +++ b/module/default.nix @@ -5,7 +5,7 @@ let cfg = config.homeage; # All files are decrypted to /run/user and cleaned up when rebooted - runtimeDecryptFolder = "/run/user/$UID/secrets"; + runtimeDecryptFolder = cfg.mount; ageBin = if cfg.isRage then "${cfg.pkg}/bin/rage" else "${cfg.pkg}/bin/age"; @@ -127,6 +127,12 @@ in type = types.bool; }; + mount = mkOption { + description = "Absolute path to folder where decrypted files are stored. Files are decrypted on login. Defaults to /run which is a tmpfs."; + default = "/run/user/$UID/secrets"; + type = types.str; + }; + folder = mkOption { description = "Absolute path to folder where encrypted age files are symlinked to"; default = "${config.home.homeDirectory}/secrets"; diff --git a/options.md b/options.md index 4690e86..e570bad 100644 --- a/options.md +++ b/options.md @@ -18,6 +18,12 @@ - *Default*: `"${config.home.homeDirectory}/secrets"`; - *Type*: `types.str`; +**homeage.mount**: + +- *Description*: Absolute path to folder where decrypted files are stored. Files are decrypted on login. Defaults to /run which is a tmpfs. +- *Default*: `/run/user/$UID/secrets`; +- *Type*: `types.str`; + **homeage.decryptScriptPath**: - *Description*: Absolute path of decryption script. Must be called on login @@ -69,7 +75,3 @@ - *Description*: Group of the decrypted file - *Default*: `"$(id -g)"` - *Type*: `types.str` - - - -