| 7 Apr 2022 |
@janne.hess:helsinki-systems.de | because the activation script needs to access a lot in /run | 15:40:23 |
@elvishjerricco:matrix.org | it does? That seems weird | 15:40:31 |
@janne.hess:helsinki-systems.de | like /run/current-system, booted-system, /run/secrets (for sops-nixos users like myself) | 15:40:42 |
@janne.hess:helsinki-systems.de | ah /run/wrappers | 15:41:25 |
@elvishjerricco:matrix.org | maybe we could run $closure/init in its own mount namespace or something | 15:42:13 |
@elvishjerricco:matrix.org | Doesn't nixos-enter do all this logic itself anyway? | 15:43:07 |
@janne.hess:helsinki-systems.de | nope, because we need to keep these mounts :D | 15:43:11 |
@elvishjerricco:matrix.org | Janne Heß: Why? systemd will do the moves for us, and then they're moves instead of binds (dunno if that matters) | 15:43:35 |
@janne.hess:helsinki-systems.de | new mounts are created that we must keep like /run/wrappers, /run/secrets.d (sops-nix again), /run/keys | 15:43:40 |
@elvishjerricco:matrix.org | ohh | 15:43:45 |
@janne.hess:helsinki-systems.de | yup+ | 15:43:53 |
@elvishjerricco:matrix.org | I guess the moves aren't recursive | 15:43:53 |
@janne.hess:helsinki-systems.de | but I have that working | 15:43:57 |
@janne.hess:helsinki-systems.de | I wrote a recursive mount mover, that works surprisingly well | 15:44:13 |
@elvishjerricco:matrix.org | How does the old initrd handle moving these? | 15:46:03 |
@janne.hess:helsinki-systems.de | not at all because theactivation script is only run in stage 2 | 15:46:38 |
@janne.hess:helsinki-systems.de | it just moves /run | 15:46:49 |
@elvishjerricco:matrix.org | ah | 15:47:52 |
@elvishjerricco:matrix.org | and yea if we want handover, we have to do activation in stage 1 | 15:48:00 |
@elvishjerricco:matrix.org | well... | 15:48:11 |
@elvishjerricco:matrix.org | actually | 15:48:13 |
@janne.hess:helsinki-systems.de | I think I have nailed it | 15:48:25 |
@elvishjerricco:matrix.org | incoming ideas for hacks | 15:48:24 |
@janne.hess:helsinki-systems.de | the only oddity is that it cannot find my swap | 15:48:39 |
@janne.hess:helsinki-systems.de | but yeah - it doesn‘t unmount /nix anymore | 15:49:05 |
@elvishjerricco:matrix.org | we could do activation in a systemd-generator, or we could set default.target for stage 2 to an activation script that does a daemon-reload and starts the real default.target | 15:49:12 |
@elvishjerricco:matrix.org | I actually like those more than doing activation in stage 1 now that I think about it | 15:49:21 |
@elvishjerricco:matrix.org | particularly the latter idea | 15:49:27 |
@janne.hess:helsinki-systems.de | feel free to implement this :D 2 systemds are already painful enough for me | 15:49:45 |
@janne.hess:helsinki-systems.de | Arian: that also removes the ugly cmdline hack and gives us a proper init= | 15:52:13 |