!DBFhtjpqmJNENpLDOv:nixos.org

NixOS systemd

600 Members
NixOS ❤️ systemd165 Servers

Load older messages


SenderMessageTime
4 Oct 2024
@elvishjerricco:matrix.orgElvishJerriccowell of course not03:19:13
@elvishjerricco:matrix.orgElvishJerricco it's ordered before sysroot.mount 03:19:17
@elvishjerricco:matrix.orgElvishJerriccooh03:19:19
@elvishjerricco:matrix.orgElvishJerriccono it makes the mounts03:19:21
@elvishjerricco:matrix.orgElvishJerriccoand then unmounts them03:19:27
@mjm:midna.devmjmit mounts the persistent FS in a temp dir03:19:32
@mjm:midna.devmjmthen creates the directories the bind mounts will be mounting from03:19:43
@mjm:midna.devmjmand then unmounts it03:19:46
@elvishjerricco:matrix.orgElvishJerriccoyea I'm pretty sure you just don't need to do that in systemd initrd03:19:58
@elvishjerricco:matrix.orgElvishJerriccoI have a feeling they made this for scripted initrd and assumed it needed a systemd initrd implementation03:20:12
@mjm:midna.devmjmmaybe?03:20:19
@mjm:midna.devmjm it's not clear to me, if you have a bind mount from /persist/foo to /foo, it makes sense to me that systemd will ensure /foo exists before mounting. but will it create /persist/foo? 03:20:58
@mjm:midna.devmjmbecause that's what this is doing03:21:03
@mjm:midna.devmjmit would be reasonable for systemd to assume it already exists imo03:21:28
@elvishjerricco:matrix.orgElvishJerricco oh 03:21:31
@elvishjerricco:matrix.orgElvishJerriccoyea03:21:32
@elvishjerricco:matrix.orgElvishJerriccothat does make sense03:21:35
@elvishjerricco:matrix.orgElvishJerriccoI mean I don't think that's how I'd do it03:21:46
@mjm:midna.devmjmand this is solving a pretty edge case in impermanence i think03:21:48
@elvishjerricco:matrix.orgElvishJerriccobut sure03:21:49
@mjm:midna.devmjmidk how i'd do it03:22:14
@mjm:midna.devmjmi think this wouldn't be an issue for LUKS, since the decrypted FS has its own device and would show up separately from the encrypted one03:23:26
@elvishjerricco:matrix.orgElvishJerricco My first thought was to make a service for the directory you want to make that has RequiresMountsFor=/sysroot/persist/whatever and Before=/sysroot/bind/whatever that does the mkdir 03:23:56
@elvishjerricco:matrix.orgElvishJerriccothat way you don't have to make these assumptions they're making03:25:12
@mjm:midna.devmjm yeah it's weird to me that they would mount it somewhere temporary instead of just introducing a service after /persist or whatever mounts and before the bind mounts 03:26:23
@mjm:midna.devmjmhttps://github.com/nix-community/impermanence/issues/222 if you feel like chiming in03:27:27
@elvishjerricco:matrix.orgElvishJerricco mjm: I mean frankly I think the problem that the service is trying to solve is a silly one 03:28:47
@elvishjerricco:matrix.orgElvishJerriccolike yes, you should make your directories03:28:54
@elvishjerricco:matrix.orgElvishJerriccoit's weird that impermanence has to automated it for you03:29:07
@mjm:midna.devmjmyeah, i think maybe it enables bootstrapping a system with impermanence from the get-go? idk i saw mention of nixos-anywhere in the PR that introduced it03:29:36

Show newer messages


Back to Room ListRoom Version: 6