Skip to content

Commit

Permalink
Merge pull request #10 from jordanisaacs/mount
Browse files Browse the repository at this point in the history
added mount option
  • Loading branch information
jordanisaacs authored Nov 8, 2021
2 parents 0ba79b0 + 0e25b17 commit 0b171d2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
8 changes: 7 additions & 1 deletion module/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down Expand Up @@ -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";
Expand Down
10 changes: 6 additions & 4 deletions options.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -69,7 +75,3 @@
- *Description*: Group of the decrypted file
- *Default*: `"$(id -g)"`
- *Type*: `types.str`




0 comments on commit 0b171d2

Please sign in to comment.