!DBFhtjpqmJNENpLDOv:nixos.org

NixOS systemd

599 Members
NixOS ❤️ systemd165 Servers

Load older messages


SenderMessageTime
11 Oct 2024
@mjm:midna.devmjmto fix up any permissions04:28:20
@elvishjerricco:matrix.orgElvishJerricco
In reply to @mjm:midna.dev
seems like it could happen after all the mounts are done
yea, I think so
04:28:31
@elvishjerricco:matrix.orgElvishJerriccoI might review the problem tomorrow04:29:29
@elvishjerricco:matrix.orgElvishJerriccoI've never used this thing04:29:36
@mjm:midna.devmjmi just started trying to use it the other day04:29:49
@mjm:midna.devmjmit still feels like an improvement over impermanence tbh04:30:01
@mjm:midna.devmjmeasier to reason about04:30:17
@elvishjerricco:matrix.orgElvishJerriccohow so?04:30:37
@elvishjerricco:matrix.orgElvishJerriccois the API simpler or something?04:30:44
@elvishjerricco:matrix.orgElvishJerriccoor is it just that it's using normal systemd tools?04:30:52
@emilazy:matrix.orgemilyIIRC impermanence doesn't work with userborn OOTB04:31:02
@emilazy:matrix.orgemilyand depends on activation scripts04:31:09
@emilazy:matrix.orgemilyso doing it systemd-natively seems like the correct approach04:31:33
@emilazy:matrix.orgemilyhttps://willibutz.github.io/preservation/impermanence-comparison.html04:31:39
@mjm:midna.devmjmit's just normal systemd. no activation scripts, no automatic persisting of existing files, no using services to bind mount files for some reason instead of just using mounts04:32:35
@mjm:midna.devmjmthere just seem to be less weird surprises for the most part04:33:42
@mjm:midna.devmjmthe API is almost the same04:34:20
@elvishjerricco:matrix.orgElvishJerriccoyea, I think it just has the relationship between file systems and tmpfiles wrong04:34:27
@elvishjerricco:matrix.orgElvishJerriccoother than that, it all sounds good04:34:31
@mjm:midna.devmjmmhm04:35:47
@willi:butz.cloudWilli Butz
In reply to @elvishjerricco:matrix.org
yea, I think it just has the relationship between file systems and tmpfiles wrong

Just saw the discussion here after responding on the issue.

So tmpfiles is currently used to populate the persistent fs before bind mounts (via mount units) are set up, and as was stated here before that is done to have targets with correct permissions for the bindmounts and symlinks from the volatile root.

This comes with its own issue of not being able to use tmpfiles inside mounts created by preservation. In TODO.md of the repo I describe both a workaround (for stage-2) and a proposed solution for this

08:59:36
@willi:butz.cloudWilli Butz @elvishjerricco:matrix.org: can you elaborate on how you'd imagine using toplevel fileSystems / fstab? 09:06:28
@willi:butz.cloudWilli Butzmy goal is to see if having an impermanence-like abstraction, that simply configures existing services (tmpfiles rules + mount units) rather than creating custom scripts, is viable. I'm very much interested to know if there is something wrong / that can be improved so that at some point such an abstraction could be provided directly from nixpkgs09:19:45
@elvishjerricco:matrix.orgElvishJerricco Willi Butz: So is the goal to have it automatically create the bind mount source directories? i.e. If there should be /persist/foo bind mounted to /foo, you want tmpfiles to automatically create /persist/foo? 18:02:38
@elvishjerricco:matrix.orgElvishJerricco Because yea, I suppose that would have to happen before the bind mounts. I don't personally consider that a critical use case; I don't think it's too much to ask for the source directories to be manually created beforehand. But if that's important to you, then yea, I think you would need to do some trickery. I'm thinking you could create a separate tmpfiles service that isn't ordered after local-fs / initrd-fs. Though again, this is assuming you need to have /persist/foo automatically created. 18:05:51
@emilazy:matrix.orgemily I assume yes precisely because / is a tmpfs 18:05:54
@emilazy:matrix.orgemily so there cannot be any /persist at boot 18:05:59
@emilazy:matrix.orgemilyor it wouldn't be very impermanent18:06:04
@elvishjerricco:matrix.orgElvishJerricco emily: well that's not the issue in that case 18:06:13
@emilazy:matrix.orgemilyyou can't "manually create them" when you have no root filesystem18:06:17

Show newer messages


Back to Room ListRoom Version: 6