|
10 | 10 | contentIfEnabled ? {},
|
11 | 11 | contentIfDisabled ? {},
|
12 | 12 | contentFinally ? {},
|
13 |
| - negate ? false, |
14 | 13 | root ? false,
|
15 | 14 | }: let
|
16 | 15 | config1 =
|
|
27 | 26 | then content config2
|
28 | 27 | else content;
|
29 | 28 |
|
30 |
| - condition = |
31 |
| - if !negate |
32 |
| - then config2.enable or true |
33 |
| - else !config2.enable or true; |
| 29 | + condition = config2.enable or true; |
34 | 30 | in {
|
35 | 31 | imports = [
|
36 | 32 | {
|
|
39 | 35 | content = wrapContent contentIfEnabled;
|
40 | 36 | }
|
41 | 37 | {
|
42 |
| - inherit condition; |
| 38 | + condition = !condition; |
43 | 39 | _type = "if";
|
44 | 40 | content = wrapContent contentIfDisabled;
|
45 | 41 | }
|
|
51 | 47 | moduleRaw {
|
52 | 48 | inherit type name contentIfEnabled;
|
53 | 49 | };
|
54 |
| - moduleIfDisabled = type: name: contentIfEnabled: |
| 50 | + moduleIfDisabled = type: name: contentIfDisabled: |
55 | 51 | moduleRaw {
|
56 |
| - inherit type name contentIfEnabled; |
57 |
| - negate = true; |
| 52 | + inherit type name contentIfDisabled; |
58 | 53 | };
|
59 | 54 | moduleIfEnabledFinally = type: name: contentIfEnabled: contentFinally:
|
60 | 55 | moduleRaw {
|
61 | 56 | inherit type name contentIfEnabled contentFinally;
|
62 | 57 | };
|
63 |
| - moduleIfDisabledFinally = type: name: contentIfEnabled: contentFinally: |
| 58 | + moduleIfDisabledFinally = type: name: contentIfDisabled: contentFinally: |
64 | 59 | moduleRaw {
|
65 |
| - inherit type name contentIfEnabled contentFinally; |
66 |
| - negate = true; |
| 60 | + inherit type name contentIfDisabled contentFinally; |
67 | 61 | };
|
68 | 62 | moduleIfElse = type: name: contentIfEnabled: contentIfDisabled:
|
69 | 63 | moduleRaw {
|
|
74 | 68 | inherit type name contentIfEnabled contentIfDisabled contentFinally;
|
75 | 69 | };
|
76 | 70 |
|
77 |
| - rootModuleIfEnabled = type: name: contentIfEnabled: |
| 71 | + rootModuleIfEnabled = type: name: contentIfDisabled: |
78 | 72 | moduleRaw {
|
79 |
| - inherit type name contentIfEnabled; |
| 73 | + inherit type name contentIfDisabled; |
80 | 74 | root = true;
|
81 | 75 | };
|
82 |
| - rootModuleIfDisabled = type: name: contentIfEnabled: |
| 76 | + rootModuleIfDisabled = type: name: contentIfDisabled: |
83 | 77 | moduleRaw {
|
84 |
| - inherit type name contentIfEnabled; |
85 |
| - negate = true; |
| 78 | + inherit type name contentIfDisabled; |
86 | 79 | root = true;
|
87 | 80 | };
|
88 | 81 | rootModuleIfEnabledFinally = type: name: contentIfEnabled: contentFinally:
|
89 | 82 | moduleRaw {
|
90 | 83 | inherit type name contentIfEnabled contentFinally;
|
91 | 84 | root = true;
|
92 | 85 | };
|
93 |
| - rootModuleIfDisabledFinally = type: name: contentIfEnabled: contentFinally: |
| 86 | + rootModuleIfDisabledFinally = type: name: contentIfDisabled: contentFinally: |
94 | 87 | moduleRaw {
|
95 |
| - inherit type name contentIfEnabled contentFinally; |
96 |
| - negate = true; |
| 88 | + inherit type name contentIfDisabled contentFinally; |
97 | 89 | root = true;
|
98 | 90 | };
|
99 | 91 | rootModuleIfElse = type: name: contentIfEnabled: contentIfDisabled:
|
|
0 commit comments