Simplify $NIX_PATH evaluation.
This commit is contained in:
parent
7c1f7aa9a1
commit
081d10bc21
2 changed files with 9 additions and 2 deletions
|
@ -68,7 +68,8 @@ in {
|
|||
};
|
||||
secretPath = mkOption {
|
||||
type = types.str;
|
||||
default = (findFirst (elem: elem.prefix == "secretPath") { path = "/secret"; } builtins.nixPath).path;
|
||||
default = let sPathVal = (tryEval <secretPath>).value;
|
||||
in fn.ifelse (sPathVal != false) sPathVal "/secret";
|
||||
description = ''
|
||||
Path to you systems secret folder containing files with sensitive information.
|
||||
'';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue