Commit 5dea800
committed
Add options to override default substituters and trusted-public-keys
This commit introduces a way to override the default substituters and trusted-public-keys copied from the reference machine.
A common use case is when the reference machine points to a local "proxy" binary cache (e.g., 127.0.0.1), which will not work on the target host.
Using `--no-use-machine-substituters` disables the feature altogether, while `--option substituters <list>` and `--option extra-substituters <list>` results in errors due to the user not being part of trusted-users.
This commit also changes how `~/.config/nix/nix.conf` is created: it now stores a backup (with a `.orig` suffix) before patching the file, and reuses that backup on future invocations.
This avoids the situation where multiple runs of `nixos-anywhere` repeatedly append the same configuration over and over.1 parent bad98b0 commit 5dea800
1 file changed
+33
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| |||
167 | 169 | | |
168 | 170 | | |
169 | 171 | | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
170 | 176 | | |
171 | 177 | | |
172 | 178 | | |
| |||
388 | 394 | | |
389 | 395 | | |
390 | 396 | | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
391 | 405 | | |
392 | 406 | | |
393 | 407 | | |
| |||
1038 | 1052 | | |
1039 | 1053 | | |
1040 | 1054 | | |
1041 | | - | |
1042 | | - | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
1043 | 1062 | | |
| 1063 | + | |
1044 | 1064 | | |
1045 | 1065 | | |
1046 | | - | |
1047 | | - | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
1048 | 1077 | | |
1049 | 1078 | | |
1050 | 1079 | | |
| |||
0 commit comments