diff --git a/fn.nix b/fn.nix index 3ea5a36..13e201b 100644 --- a/fn.nix +++ b/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)