Commit 04da25c
committed
nixos/activation: no output for empty snippets
There are several empty snippets in a standard configuration. They are
present only for backward compatibility with other snippets which may
have declared dependencies on them.
This patch eliminates the per-snippet boilerplate for empty snippets.
If, someday, we get to the point where there are no non-empty activation
snippets, then this will lead to an empty string where the snippets used
to be.
Note that I didn't want newlines inserted where empty scripts used to be
either, so rather than using textClosureMap with its built-in "\n"
separators, I switched to using the underlying textClosureList, and
adding an extra newline only for non-empty snippets.1 parent a3180b5 commit 04da25c
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | | - | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
0 commit comments