|
45 | 45 | "workDirectory = \"/var/lib/hercules-ci-agent/work\"", |
46 | 46 | "remotePlatformsWithSameFeatures = [\"aarch64-darwin\"]", |
47 | 47 | "nixVerbosity = \"vomit\"", |
| 48 | + "[nixSettings]", |
| 49 | + " substituters = \"https://example.com\"", |
48 | 50 | -- This line should not be needed! |
49 | 51 | "[effectMountables]", |
50 | 52 | "[effectMountables.hosts]", |
|
91 | 93 | condition = Hercules.Formats.Secret.Const True |
92 | 94 | } |
93 | 95 | ) |
94 | | - ] |
| 96 | + ], |
| 97 | + nixSettings = M.singleton "substituters" "https://example.com" |
95 | 98 | } |
96 | 99 | ) |
97 | 100 | it "parses empty config" $ do |
@@ -119,6 +122,7 @@ spec = |
119 | 122 | "\"secretsJsonPath\": \"/var/lib/hercules-ci-agent/secrets/secrets.json\",", |
120 | 123 | "\"logLevel\": \"DebugS\",", |
121 | 124 | "\"nixVerbosity\": \"Vomit\",", |
| 125 | + "\"nixSettings\": { \"substituters\": \"https://example.com\" },", |
122 | 126 | "\"remotePlatformsWithSameFeatures\": [\"aarch64-darwin\"],", |
123 | 127 | "\"labels\": {", |
124 | 128 | " \"agent\": {\"source\": \"flake\"},", |
@@ -169,7 +173,8 @@ spec = |
169 | 173 | condition = Hercules.Formats.Secret.Const True |
170 | 174 | } |
171 | 175 | ) |
172 | | - ] |
| 176 | + ], |
| 177 | + nixSettings = M.singleton "substituters" "https://example.com" |
173 | 178 | } |
174 | 179 |
|
175 | 180 | it "handles empty config" $ do |
@@ -232,5 +237,6 @@ emptyConfig = |
232 | 237 | labels = Nothing, |
233 | 238 | allowInsecureBuiltinFetchers = Nothing, |
234 | 239 | remotePlatformsWithSameFeatures = Nothing, |
235 | | - effectMountables = mempty |
| 240 | + effectMountables = mempty, |
| 241 | + nixSettings = mempty |
236 | 242 | } |
0 commit comments