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)
|
(p: true) (deps p)
|
||||||
);
|
);
|
||||||
sopsHelper = template: names: options: let
|
sopsHelper = template: names: options: let
|
||||||
nameList = map template names;
|
optionsIsFunction = (typeOf options) == "lambda";
|
||||||
in listToAttrs (map (nameEntry: {name = nameEntry; value = options;}) nameList);
|
in listToAttrs (map
|
||||||
|
(name: {
|
||||||
|
name = template name;
|
||||||
|
value = ifelse optionsIsFunction (options name) options;
|
||||||
|
})
|
||||||
|
names);
|
||||||
pkgFilter = ld: (filter
|
pkgFilter = ld: (filter
|
||||||
(p: (
|
(p: (
|
||||||
ifelse (isBroken p)
|
ifelse (isBroken p)
|
||||||
|
|
Loading…
Reference in a new issue