File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222 inherit ( lib . strings ) removeSuffix ;
2323
2424 ageFiles =
25- attrNames config' |> filter ( v : config' . ${ v } ? publicKeys ) |> ( x : genAttrs x ( v : config' . ${ v } ) ) ;
25+ attrNames config'
26+ |> filter (
27+ v : config' . ${ v } ? publicKeys && ! ( config' . ${ v } ? dontLoad && config' . ${ v } . dontLoad == true )
28+ )
29+ |> ( x : genAttrs x ( v : config' . ${ v } ) ) ;
2630
2731 systemPublicKeys =
2832 config' . system . ${ config . networking . hostName } . secrets
7377 ] ;
7478 in
7579 {
76- age . identityPaths = lib . pipe ( config' . secrets or { } ) [
77- ( filterAttrs ( n : v : v ? pkeyfile && v . pkeyfile != null ) )
78- ( mapAttrs ( _ : v : v . pkeyfile ) )
79- attrValues
80- ] ;
80+ age . identityPaths =
81+ lib . pipe ( config' . secrets or { } ) [
82+ ( filterAttrs ( n : v : v ? pkeyfile && v . pkeyfile != null ) )
83+ ( mapAttrs ( _ : v : v . pkeyfile ) )
84+ attrValues
85+ ]
86+ ++
87+ # Some users don't actually need agenix setup, but since this module
88+ # does it anyway, that's an issue.
89+ # age.identityPaths can never be empty. To fix that, well, we have
90+ # this beauty right here.
91+ [ "/some/random/trash/path" ] ;
8192
8293 age . secrets = lib . pipe ageFiles [
8394 ( filterAttrs ( n : v : ( intersectLists v . publicKeys publicKeys ) != [ ] ) )
You can’t perform that action at this time.
0 commit comments