summaryrefslogtreecommitdiff
path: root/pki/by-path.nix
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--pki/by-path.nix17
1 files changed, 10 insertions, 7 deletions
diff --git a/pki/by-path.nix b/pki/by-path.nix
index baca142..ebc46ef 100644
--- a/pki/by-path.nix
+++ b/pki/by-path.nix
@@ -1,15 +1,18 @@
-{ config, lib, ... }:
+{
+ config,
+ lib,
+ ...
+}:
with lib; {
options.local.pki.byPath = mkOption {
type = with lib.types; attrsOf unspecified;
readOnly = true;
};
- config.local.pki.byPath =
- let
- caWithLeaves = ca:
- singleton { "${ca.path}" = ca; }
- ++ map (leaf: { "${leaf.path}" = leaf; }) (attrValues ca.leaves);
- in
+ config.local.pki.byPath = let
+ caWithLeaves = ca:
+ singleton {"${ca.path}" = ca;}
+ ++ map (leaf: {"${leaf.path}" = leaf;}) (attrValues ca.leaves);
+ in
mergeAttrsList (flatten (map caWithLeaves (attrValues config.local.pki.ca)));
}