22 May 2023 |
Arian | works!! woohoo | 17:26:52 |
Arian | Ill make a PR to add the repart definitions file to config.system.build.repartDefitions so that it can be consumed by image builder | 17:54:24 |
Arian | hmm systemd-repart CopyFiles not working in a derivation | 18:12:04 |
Arian | crashes with Failed to create temporary directory: No such file or directory | 18:12:11 |
Arian | time to dive in | 18:12:14 |
@elvishjerricco:matrix.org | Arian: Same thing as this? https://github.com/NixOS/nixpkgs/pull/232533/files#diff-e3878de7d7be6c8d04741535f3ffbed368e3ad379eb804daa12ca0056816b1e5R107-R111 | 18:13:42 |
Arian | yes@@ | 18:14:07 |
Arian | thanks! | 18:14:09 |
Arian | hmm setting TMPDIR=/tmp doesn't seem to help for some reason | 18:15:22 |
Arian | oh wait /tmp doesnt exist in the build sandbox of course | 18:16:08 |
Arian | still same error. darnit | 18:17:42 |
Arian | mkdir -p /build/tmp
TMPDIR=/build/tmp systemd-repart \
--empty=create \
--size=2G \
--definitions ${config.system.build.partitionDefinitions} \
$out
| 18:21:14 |
Arian | it's weird because stdenv alreayd sets TMPDIR=/build by default | 18:23:08 |
Arian | idk why it's not being picked up | 18:23:13 |
Arian | urgh and cant reproduce in nix develop . Then it does work. strange | 18:30:17 |
Arian | Seems for some reason systemd'sis_dir_full() returns false for the /build folder in the build sandbox. | 18:34:38 |
@nikstur:matrix.org | I needed this commit to make systemd-repart behave nicely in the build sandbox | 18:38:09 |
@nikstur:matrix.org | Which is after v253 | 18:38:22 |
@nikstur:matrix.org | https://github.com/systemd/systemd/commit/1eb86ddde4f36165a99732b53cc97cef1acc3aa7 | 18:39:11 |
@nikstur:matrix.org | wait... this wasnt after 253 | 18:39:57 |
Arian | it is though no? | 18:41:36 |
Arian | dont see the commit associated with any tags | 18:41:42 |
Arian | No. this is in v253. you're right. Weird | 18:43:09 |
Arian | wondering why it works for you in build sandbox and not for me | 18:43:38 |
@nikstur:matrix.org | Mhmm I'll investigate this tomorrow | 18:46:40 |
Arian | ill push my changes one sec. | 18:48:09 |
@nikstur:matrix.org | Ahh it didn't land in 253-stable: https://github.com/systemd/systemd-stable/blob/v253-stable/src/partition/repart.c#L3917 | 18:48:55 |
@nikstur:matrix.org | even if the commit was from a day before they tagged | 18:49:07 |
Arian | https://github.com/arianvp/server-optimised-nixos/blob/157ef33b278b581b92aad8c3200941139d84f96a/flake.nix | 18:50:05 |
Arian | aha! | 18:50:20 |