File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 2
2
3
3
let
4
4
fclib = config . fclib ;
5
+
6
+ # Only check "visible" roles, skipping roles that are marked as removed by
7
+ # `mkRemovedOptionModule` or manually set to `visible = false`.
8
+ # The `tryEval` is needed because visiting the role option throws an error if
9
+ # the option is declared by `mkRemovedOptionModule`.
10
+ visibleFCRoles = ( lib . filterAttrs
11
+ ( n : v : ( builtins . tryEval v . enable . visible or true ) . value )
12
+ config . flyingcircus . roles ) ;
5
13
in
6
14
{
7
15
config = lib . mkMerge [
18
26
# the option is declared by `mkRemovedOptionModule`.
19
27
( lib . filterAttrs
20
28
( n : v : ( builtins . tryEval v . enable . visible or true ) . value )
21
- config . flyingcircus . roles ) ;
29
+ visibleFCRoles ) ;
22
30
}
23
31
24
32
( lib . mkIf ( config . flyingcircus . infrastructureModule == "container" ) {
30
38
{ assertion = if ( v . enable or false ) then
31
39
( v . supportsContainers or true ) else true ;
32
40
message = "role ${ n } does not support containers" ;
33
- } ) config . flyingcircus . roles ;
41
+ } ) visibleFCRoles ;
34
42
35
43
boot . isContainer = true ;
36
44
You can’t perform that action at this time.
0 commit comments