fn.sopsHelper option argument can now be a function or a set.
This commit is contained in:
parent
ec93123f4d
commit
9878b40111
1 changed files with 7 additions and 2 deletions
9
fn.nix
9
fn.nix
|
@ -58,8 +58,13 @@ rec {
|
|||
(p: true) (deps p)
|
||||
);
|
||||
sopsHelper = template: names: options: let
|
||||
nameList = map template names;
|
||||
in listToAttrs (map (nameEntry: {name = nameEntry; value = options;}) nameList);
|
||||
optionsIsFunction = (typeOf options) == "lambda";
|
||||
in listToAttrs (map
|
||||
(name: {
|
||||
name = template name;
|
||||
value = ifelse optionsIsFunction (options name) options;
|
||||
})
|
||||
names);
|
||||
pkgFilter = ld: (filter
|
||||
(p: (
|
||||
ifelse (isBroken p)
|
||||
|
|
Loading…
Reference in a new issue