gunk-dev/the-valley

host-module.nix

sourcea0911fc82b8emain's published tip history
26.4 KiB
1# What the NixOS module renders from a declaration, and what it must refuse.
2# The refusals are eval-time: a host that must not evaluate is caught by a
3# throw here, since there is nothing to build once it has. What a host does
4# render is pinned by module-eval.sh over the rendered scripts.
5#
6# Every host here runs the stand-ins for this flake's programs
7# (nix/checks/hosts.nix). Nothing here runs a program: each assertion is
8# about the units, hooks and scripts the module renders, which name a
9# program's path and the flags it is given. So module-eval changes when the
10# module, a host declaration or this check does, and not when a program
11# does.
12{
13 pkgs,
14 lib,
15 stubbedHosts,
16 ...
17}:
18let
19 inherit (stubbedHosts)
20 unprotectedInstanceHost
21 acceptEnvHost
22 matchAcceptEnvHost
23 wildcardAcceptEnvHost
24 quotedAcceptEnvHost
25 tabAcceptEnvHost
26 setEnvHost
27 permitUserEnvironmentHost
28 conflictingKeysHost
29 host
30 noBackupHost
31 noSecretsHost
32 protectedHost
33 busHost
34 mirrorHost
35 integratorHost
36 integratorSelfHost
37 restrictedHost
38 spacedSignerProjectsHost
39 unicodeSpacedSignerProjectsHost
40 identityHost
41 ;
42
43 failedAssertions = builtins.filter (a: !a.assertion) (
44 host.config.assertions
45 ++ noBackupHost.config.assertions
46 ++ busHost.config.assertions
47 ++ mirrorHost.config.assertions
48 ++ protectedHost.config.assertions
49 ++ integratorHost.config.assertions
50 ++ integratorSelfHost.config.assertions
51 ++ restrictedHost.config.assertions
52 ++ identityHost.config.assertions
53 );
54
55 missingSecretAssertions = builtins.filter (a: !a.assertion) noSecretsHost.config.assertions;
56
57 # The hosts the module must refuse, each with the words its refusal must
58 # say. An assertion that stopped firing would leave the push policy
59 # quietly wrong, so each is held to naming what is wrong.
60 refusedHosts = [
61 {
62 host = unprotectedInstanceHost;
63 says = "whose refs/heads/main is not protected";
64 why = "an instance repository without protection would let any key that can push rewrite the floor and the registry";
65 }
66 {
67 host = acceptEnvHost;
68 says = "AcceptEnv";
69 why = "sshd accepting the principal variable from the client would let any key name any principal";
70 }
71 {
72 host = matchAcceptEnvHost;
73 says = "GIT_CONFIG_*";
74 why = "sshd accepting GIT_ variables in the git user's Match block, in whatever case the keyword is written, would let a client set git's configuration";
75 }
76 {
77 host = wildcardAcceptEnvHost;
78 says = "G?T_*";
79 why = "a wildcard that admits GIT_ variables admits them however it is spelled";
80 }
81 {
82 host = quotedAcceptEnvHost;
83 says = "holds a quote or a backslash";
84 why = "a quoted name is one sshd unquotes and admits, so a check that read it differently would pass it";
85 }
86 {
87 host = tabAcceptEnvHost;
88 says = "VALLEY_PRINCIPAL from the client";
89 why = "a name after a tab is a name sshd admits";
90 }
91 {
92 host = setEnvHost;
93 says = "SetEnv";
94 why = "sshd setting the principal itself would make every key push as it";
95 }
96 {
97 host = permitUserEnvironmentHost;
98 says = "PermitUserEnvironment";
99 why = "a PermitUserEnvironment wider than the principal variable would let a key's entry or ~/.ssh/environment set what the push policy does not expect";
100 }
101 {
102 host = spacedSignerProjectsHost;
103 says = "services.valley.integrator.signerProjects holds";
104 why = "a project with a space in it would be read back as two projects the declaration never listed";
105 }
106 {
107 host = unicodeSpacedSignerProjectsHost;
108 says = "services.valley.integrator.signerProjects holds";
109 why = "a project holding a no-break space would be read back by the integrator as two projects, or refused at start";
110 }
111 {
112 host = conflictingKeysHost;
113 says = "more than one principal tag";
114 why = "a key declared under two tags would push as whichever entry sshd reads first";
115 }
116 ];
117
118 unrefusedHosts = builtins.filter (
119 r: !(lib.any (a: !a.assertion && lib.hasInfix r.says a.message) r.host.config.assertions)
120 ) refusedHosts;
121
122 protectedKeyLines = protectedHost.config.users.users.git.openssh.authorizedKeys.keys;
123
124 resticRenderedWithoutDeclaration =
125 noBackupHost.config.systemd.services ? "restic-backups-valley"
126 || noBackupHost.config.systemd.timers ? "restic-backups-valley";
127
128 # The bus defaults off; a host that never asked for one must
129 # render zero bus machinery.
130 busRenderedWithoutEnable =
131 noBackupHost.config.systemd.services ? valley-bus
132 || noBackupHost.config.systemd.services ? valley-bus-init;
133
134 # A declaration with no protection block and no tagged key still gets
135 # the push policy on every project — the policy is the host's, and a
136 # protection block only adds protected refs to it — and nothing of the
137 # principal machinery: no tag on a key, no sshd change.
138 protectionRenderedWithoutDeclaration =
139 noBackupHost.config.services.openssh.settings ? PermitUserEnvironment
140 || lib.any (lib.hasInfix "environment=") (
141 noBackupHost.config.users.users.git.openssh.authorizedKeys.keys
142 );
143
144 policyMissingWithoutDeclaration =
145 !(lib.hasInfix "valley-protect-the-valley" noBackupHost.config.systemd.services.valley-init.script);
146
147 # The integrator's units. What a controller *does* is not checked here
148 # and no VM is booted: that is integrator-e2e's job (the real binaries
149 # over real repositories) and, past it, live exercise on a host. These
150 # assertions cover the wiring — that a controller is rendered for what
151 # the declaration protects and for nothing else, under an identity that
152 # is not the git user's, pointed at the key and the signers the consumer
153 # supplied.
154 #
155 # There is a seam between those two halves that neither reaches, and in a
156 # single day it produced five deployment failures. Every assertion below is
157 # an eval of the unit's text; integrator-e2e runs the binaries with no unit
158 # around them at all. What sits between is the unit's sandbox and identity
159 # meeting the filesystem the binaries actually use at runtime:
160 #
161 # - git refusing a repository the service does not own (bd-500adf7)
162 # - a push authenticating as the operator rather than as the run
163 # (bd-353c59d)
164 # - no writable temporary directory, so no worktree could be made
165 # - the worktree metadata root, created by whichever service reached it
166 # first and then unchmodable by the other, which failed valley-init and
167 # took every valley unit down with it
168 # - the state directory not writable under ProtectSystem=strict unless
169 # the unit names it, which the previous fix had made the scratch root
170 #
171 # Each was found by a host, minutes of a live service after a deploy that
172 # every check here passed. They compose: the third's fix set up the fourth,
173 # and the fourth's fix set up the fifth. That is the argument. A seam whose
174 # failures feed each other is not one to pin an assertion at a time, and
175 # each assertion here that marks a piece of it — the git ownership
176 # exception, TMPDIR, the worktrees root, ReadWritePaths — marks a place a
177 # smoke boot would have spoken first.
178 #
179 # A nixosTest that boots one host, starts the units and reconciles one
180 # change end to end is the next check this module needs. Nothing else
181 # closes the seam, and five incidents is enough evidence of what it costs
182 # to leave open. Not built here.
183 #
184 # Protection and integration are separable declarations: protectedHost
185 # declares the same protected projects with the service off, and must
186 # evaluate to no controller at all.
187 integratorRenderedWithoutEnable =
188 protectedHost.config.systemd.services ? "valley-integrator@"
189 || protectedHost.config.systemd.targets ? valley-integrators
190 || lib.hasInfix "sharedRepository" protectedHost.config.systemd.services.valley-init.script;
191
192 # One target pulls in each controller, and another the path unit that
193 # publishes each project's queued moves, landings included.
194 integratorWants = integratorHost.config.systemd.targets.valley-integrators.wants;
195 controllers = lib.filter (lib.hasPrefix "valley-integrator@") integratorWants;
196 publishers = integratorHost.config.systemd.targets.valley-publish.wants;
197
198 integratorUser = integratorHost.config.systemd.services."valley-integrator@".serviceConfig.User;
199
200 # The controller is not the repositories' owner, which is the whole point
201 # of running it as itself — so git needs an ownership exception, and
202 # where that exception lives is load-bearing. GIT_CONFIG_* is command
203 # scope, the only scope besides system and global that safe.directory is
204 # read from, and the unit's environment is inherited by every git the
205 # controller drives. It names one repository: a wildcard here would hand
206 # a compromised controller every repository on the host.
207 integratorGitEnv = integratorHost.config.systemd.services."valley-integrator@".environment;
208
209 # The count is what git reads; an entry past it is an entry git ignores,
210 # silently. So it is checked against the entries actually rendered rather
211 # than against a number written here, which would have to be edited every
212 # time a grant is added and would go on passing if it were not.
213 integratorSafeDirectory =
214 integratorGitEnv.GIT_CONFIG_KEY_0 or null != "safe.directory"
215 || integratorGitEnv.GIT_CONFIG_VALUE_0 or null != "/srv/git/%i.git"
216 || integratorGitEnv.GIT_CONFIG_COUNT or null
217 != toString (
218 lib.length (lib.filter (lib.hasPrefix "GIT_CONFIG_KEY_") (lib.attrNames integratorGitEnv))
219 );
220
221 integratorService = integratorHost.config.systemd.services."valley-integrator@".serviceConfig;
222
223 # Scratch goes under the state directory, because the sandbox leaves no
224 # writable temporary directory and a verdict needs a checkout on disk. Two
225 # halves, and each was a live failure on its own. TMPDIR naming a path
226 # outside the state directory is the first; the state directory not being
227 # named in ReadWritePaths is the second, which failed even though
228 # ProtectSystem=strict is documented to leave a declared state directory
229 # writable. Everything the unit may write is enumerated, so what a reader
230 # of the unit sees is the whole of it.
231 # The floor is read from the instance repository's integrated tip
232 # (dcr-f41f718, dcr-b87f6e8), so a controller is told which repository
233 # carries it and reads it there. Three things have to be true of that, and
234 # each was a way for it to be silently wrong.
235 #
236 # The controller has to be told at all — the failure this replaced was a
237 # binary looking for a materialized directory nothing populated.
238 #
239 # It has to work when the repository carrying the floor is not the one the
240 # controller serves, which is the ordinary case: on integratorHost every
241 # controller serves a protected project and reads the floor out of
242 # "open", which no controller serves. git refuses a repository the caller
243 # does not own, so that read needs its own safe.directory entry, named and
244 # not wildcarded — the same failure as the served repository's, one
245 # repository over.
246 #
247 # And it has to keep working when the two coincide, which is what an
248 # instance's own host looks like: integratorSelfHost's controller for
249 # "guarded" reads the floor from "guarded".
250 integratorFloor =
251 let
252 command = integratorHost.config.systemd.services."valley-integrator@".serviceConfig.ExecStart;
253 selfCommand = integratorSelfHost.config.systemd.services."valley-integrator@".serviceConfig.ExecStart;
254 env = integratorHost.config.systemd.services."valley-integrator@".environment;
255 in
256 !(lib.hasInfix "--instance-repo /srv/git/sealed.git" command)
257 || !(lib.hasInfix "--instance-repo /srv/git/guarded.git" selfCommand)
258 || env.GIT_CONFIG_COUNT or null != "2"
259 || env.GIT_CONFIG_KEY_1 or null != "safe.directory"
260 || env.GIT_CONFIG_VALUE_1 or null != "/srv/git/sealed.git";
261
262 integratorScratch =
263 integratorGitEnv.TMPDIR or null != "/var/lib/${integratorService.StateDirectory}"
264 || !(builtins.elem "/var/lib/${integratorService.StateDirectory}" integratorService.ReadWritePaths);
265
266 # The registry compiler. It is off by default and must stay inert: a
267 # consumer that has not asked for it renders the system it always did.
268 # integratorHost is the strongest witness available — the integrator on,
269 # the signers file supplied by hand, and every option of the identity
270 # block left alone.
271 identityRenderedWithoutEnable =
272 integratorHost.config.systemd.services ? valley-identity
273 || integratorHost.config.systemd.timers ? valley-identity
274 || integratorHost.config.services.openssh.settings ? PermitUserEnvironment
275 || lib.any (lib.hasInfix "valley-identity") integratorHost.config.services.openssh.authorizedKeysFiles
276 || lib.hasInfix "valley-identity" integratorHost.config.services.openssh.extraConfig
277 || lib.hasInfix "valley-identity" (
278 integratorHost.config.systemd.services."valley-integrator@".serviceConfig.ExecStart
279 )
280 || lib.hasInfix "--name " (
281 integratorHost.config.systemd.services."valley-integrator@".serviceConfig.ExecStart
282 );
283
284 identityService = identityHost.config.systemd.services.valley-identity.serviceConfig;
285
286 identityStateDir = "/var/lib/${identityService.StateDirectory or ""}";
287
288 # What the compiled artifacts have to be true of, and each was a way for
289 # the machinery to be quietly wrong.
290 #
291 # The compiler writes into its state directory and nowhere else, so that
292 # directory has to be the one path the unit may write.
293 #
294 # sshd walks every directory above an authorized-keys file and refuses a
295 # group- or world-writable one, so the state directory is 0755 rather than
296 # the 0700 a service's state usually takes — and the unit runs as the git
297 # user, because sshd equally refuses a file owned by anyone but root or
298 # the account it authorizes.
299 #
300 # The compiled file is added to what sshd reads for the git user rather
301 # than replacing it, and for the git user alone: the user's Match block
302 # names the declared keys and the compiled ones, and nothing else — no
303 # ~/.ssh/authorized_keys, no AuthorizedKeysCommand — so every key the git
304 # user accepts carries a tag this module or the compiler wrote. The
305 # compiler is handed the declared keys, so it can refuse a registry key
306 # declared under another tag.
307 identityCompiler =
308 identityService.User or null != identityHost.config.services.valley.user
309 || identityService.StateDirectoryMode or null != "0755"
310 || identityService.ReadWritePaths or [ ] != [ identityStateDir ]
311 || !(lib.hasInfix "--repo /srv/git/sealed.git" identityService.ExecStart)
312 || !(lib.hasInfix "--known-signers ${identityStateDir}/known-signers" identityService.ExecStart)
313 || !(lib.hasInfix "--authorized-keys ${identityStateDir}/authorized_keys.git" identityService.ExecStart)
314 || !(lib.hasInfix "--grants ${identityStateDir}/grants" identityService.ExecStart)
315 || !(lib.hasInfix "-valley-declared-keys" identityService.ExecStart)
316 || !(lib.hasInfix "AuthorizedKeysFile /etc/ssh/authorized_keys.d/%u ${identityStateDir}/authorized_keys.git\n" identityHost.config.services.openssh.extraConfig)
317 || !(lib.hasInfix "AuthorizedKeysCommand none" identityHost.config.services.openssh.extraConfig);
318
319 # A controller under a compiled registry reads the compiled signers file
320 # and signs under the name the registry publishes its key under. The key
321 # hash binds name to key, so a controller signing under the host's default
322 # name while the registry publishes it as "integrator" would produce notes
323 # no verifier can find a key for.
324 identityIntegrator =
325 let
326 command = identityHost.config.systemd.services."valley-integrator@".serviceConfig.ExecStart;
327 in
328 !(lib.hasInfix "--known-signers ${identityStateDir}/known-signers" command)
329 || !(lib.hasInfix "--name integrator" command)
330 || !(builtins.elem "valley-identity.service"
331 identityHost.config.systemd.services."valley-integrator@".after
332 );
333
334 # The signers publication. A host whose integrator runs and which serves
335 # the instance repository publishes there what a client verifies its
336 # transfer statements with. What it publishes has to be what the
337 # controllers use: the same signers file and the same --name, or none on
338 # either, in which case both take the binary's default. The publisher
339 # writes as the git user, which owns the instance repository, may write
340 # that repository and nothing else, runs after the compilation when there
341 # is one, and runs again whenever the signers file changes. The signer
342 # projects file is the controllers' too, or neither has one.
343 flagValue =
344 flag: command:
345 let
346 m = builtins.match ".*--${flag} ([^ ]+).*" command;
347 in
348 if m == null then null else lib.head m;
349
350 signersPublisher =
351 host: repo:
352 let
353 unit = host.config.systemd.services.valley-signers;
354 publish = unit.serviceConfig.ExecStart;
355 controller = host.config.systemd.services."valley-integrator@".serviceConfig.ExecStart;
356 in
357 !(lib.hasInfix "/bin/integrator publish-signers " publish)
358 || flagValue "instance-repo" publish != repo
359 || flagValue "known-signers" publish != flagValue "known-signers" controller
360 || flagValue "name" publish != flagValue "name" controller
361 || flagValue "signer-projects" publish != flagValue "signer-projects" controller
362 || unit.serviceConfig.User or null != "git"
363 || unit.serviceConfig.ReadWritePaths or [ ] != [ repo ]
364 || !(builtins.elem "valley-init.service" unit.after)
365 || !(builtins.elem "multi-user.target" unit.wantedBy)
366 || host.config.systemd.paths.valley-signers.pathConfig.PathChanged or null
367 != flagValue "known-signers" controller
368 || !(builtins.elem "multi-user.target" host.config.systemd.paths.valley-signers.wantedBy);
369
370 signersRenderedWithoutIntegrator =
371 protectedHost.config.systemd.services ? valley-signers
372 || protectedHost.config.systemd.paths ? valley-signers;
373
374 signersUnpublished =
375 signersPublisher integratorHost "/srv/git/sealed.git"
376 || signersPublisher restrictedHost "/srv/git/sealed.git"
377 || signersPublisher integratorSelfHost "/srv/git/guarded.git"
378 || signersPublisher identityHost "/srv/git/sealed.git"
379 || flagValue "name" identityHost.config.systemd.services.valley-signers.serviceConfig.ExecStart
380 != "integrator"
381 || !(builtins.elem "valley-identity.service" identityHost.config.systemd.services.valley-signers.after);
382
383 # A host that restricts no signer gives its controllers no signer
384 # projects file, and one that restricts some gives them one.
385 signerProjectsMisrendered =
386 flagValue "signer-projects" integratorHost.config.systemd.services."valley-integrator@".serviceConfig.ExecStart
387 != null
388 || flagValue "signer-projects" restrictedHost.config.systemd.services."valley-integrator@".serviceConfig.ExecStart
389 == null;
390
391 # The declared keys stay authorized beside the compiled ones. A compiled
392 # file that replaced them would make a bad compilation — or a first boot
393 # before the first one — a locked-out git user, which is the one failure
394 # this machinery must never have.
395 identityKeepsDeclaredKeys =
396 identityHost.config.users.users.git.openssh.authorizedKeys.keys == [ ];
397in
398{
399 module-eval =
400 if failedAssertions != [ ] then
401 throw "valley module-eval: failed assertions: ${
402 lib.concatMapStringsSep "; " (a: a.message) failedAssertions
403 }"
404 else if resticRenderedWithoutDeclaration then
405 throw "valley module-eval: restic machinery rendered for a declaration without a backup block"
406 else if busRenderedWithoutEnable then
407 throw "valley module-eval: bus machinery rendered without services.valley.bus.enable"
408 else if
409 !(lib.any (a: lib.hasInfix "services.valley.backup." a.message) missingSecretAssertions)
410 then
411 throw "valley module-eval: enabling backup without the secret-path options must fail an assertion naming them"
412 else if unrefusedHosts != [ ] then
413 throw "valley module-eval: ${lib.concatMapStringsSep "; " (r: "a host was not refused although ${r.why}") unrefusedHosts}"
414 else if protectionRenderedWithoutDeclaration then
415 throw "valley module-eval: principal machinery rendered for a declaration with no protection block and no tagged key"
416 else if policyMissingWithoutDeclaration then
417 throw "valley module-eval: a project with no protection block got no pre-receive hook — the push policy is installed on every project a host serves"
418 else if protectedHost.config.services.openssh.settings ? PermitUserEnvironment then
419 throw "valley module-eval: sshd must pass no key's environment on: the git user's shell derives the principal from the authenticated key"
420 else if
421 !(lib.hasInfix "valley-git-shell" protectedHost.config.users.users.git.shell)
422 then
423 throw "valley module-eval: the git user's login shell must be the valley's, which derives the principal and pauses pushes until init converges"
424 else if integratorRenderedWithoutEnable then
425 throw "valley module-eval: integrator machinery rendered for a protected declaration that never enabled the service"
426 else if !(integratorHost.config.systemd.services ? "valley-integrator@") then
427 throw "valley module-eval: the integrator is enabled and no controller unit was rendered"
428 else if
429 controllers != [
430 "valley-integrator@guarded.service"
431 "valley-integrator@released.service"
432 "valley-integrator@sealed.service"
433 ]
434 then
435 throw "valley module-eval: a controller runs for each protected project and no other, not ${lib.concatStringsSep ", " controllers}"
436 else if
437 publishers != [
438 "valley-publish@guarded.path"
439 "valley-publish@released.path"
440 "valley-publish@sealed.path"
441 ]
442 then
443 throw "valley module-eval: each controller's landings are published by a path unit of its own, not ${lib.concatStringsSep ", " publishers}"
444 else if integratorHost.config.systemd.services."valley-publish@".serviceConfig.User != "git" then
445 throw "valley module-eval: a landing is published as the git user, which holds the mirror credentials"
446 else if integratorUser == integratorHost.config.services.valley.user then
447 throw "valley module-eval: the integrator must not run as the git user — it has its own (bd-500adf7)"
448 else if !(integratorHost.config.users.users ? ${integratorUser}) then
449 throw "valley module-eval: the integrator runs as ${integratorUser}, which the module never declares"
450 else if integratorHost.config.users.users.${integratorUser}.group != "git" then
451 throw "valley module-eval: the integrator reaches the repositories through the git group, and holds no other grant"
452 else if integratorSafeDirectory then
453 throw "valley module-eval: a controller must carry safe.directory for the one repository it serves in its own environment — it does not own the repositories, and git refuses what it does not own"
454 else if integratorFloor then
455 throw "valley module-eval: a controller must be told which repository carries the floor, and must carry a safe.directory exception for it — the floor is read from that repository's integrated tip, and git refuses a repository its caller does not own"
456 else if integratorScratch then
457 throw "valley module-eval: a controller's TMPDIR must be its state directory and that directory must be named in ReadWritePaths — under ProtectSystem=strict a path the unit does not enumerate is one it cannot write, and a verdict needs a worktree on disk"
458 else if identityRenderedWithoutEnable then
459 throw "valley module-eval: registry-compilation machinery rendered for a host that never enabled it — nothing may change until a consumer opts in"
460 else if identityCompiler then
461 throw "valley module-eval: the compiler must run as the git user, write only its own 0755 state directory, read the registry from the instance repository, write the grants the pre-receive hook reads, and have its authorized_keys added to what sshd reads under the %u token — sshd refuses a keys file owned by anyone but root or the account it authorizes, and a fixed path in that global list would authorize every registry key for every account on the host"
462 else if identityIntegrator then
463 throw "valley module-eval: a controller under a compiled registry must read the compiled signers file, start after the compilation, and sign under the name the registry publishes its key under"
464 else if signersRenderedWithoutIntegrator then
465 throw "valley module-eval: a signers publication rendered for a host whose integrator is off — there is no transfer statement to verify"
466 else if signersUnpublished then
467 throw "valley module-eval: the signers publisher must publish the controllers' own signers file and signing name into the instance repository, as the git user, writing nothing else, after valley-init and the compilation, at boot and whenever the signers file changes"
468 else if signerProjectsMisrendered then
469 throw "valley module-eval: a controller is given a signer projects file exactly when the host restricts a signer to projects"
470 else if identityKeepsDeclaredKeys then
471 throw "valley module-eval: the declared authorized keys must stay authorized beside the compiled ones — a compiled file that replaced them would make a bad compilation a locked-out git user"
472 else
473 pkgs.runCommand "valley-module-eval" {
474 initScript = host.config.systemd.services.valley-init.script;
475 sshdConfig = host.config.services.openssh.extraConfig;
476 resticService = host.config.systemd.units."restic-backups-valley.service".text;
477 resticTimer = host.config.systemd.units."restic-backups-valley.timer".text;
478 protectedInit = protectedHost.config.systemd.services.valley-init.script;
479 protectedKeys = lib.concatStringsSep "\n" protectedKeyLines;
480 protectedShell = protectedHost.config.users.users.git.shell;
481 integratorUnit = integratorHost.config.systemd.units."valley-integrator@.service".text;
482 integratorInit = integratorHost.config.systemd.services.valley-init.script;
483 publishUnit = host.config.systemd.units."valley-publish@.service".text;
484 identityInit = identityHost.config.systemd.services.valley-init.script;
485 passAsFile = [
486 "initScript"
487 "sshdConfig"
488 "resticService"
489 "resticTimer"
490 "protectedInit"
491 "protectedKeys"
492 "integratorUnit"
493 "integratorInit"
494 "publishUnit"
495 "identityInit"
496 ];
497 } (builtins.readFile ./module-eval.sh);
498}