!coeAONBrWyDJnYMbMi:nixos.org

NixOS System Operations

556 Members
About system administration for running NixOS systems in production. Declaratively manage your operations. | Room recommendations: #networking:nixos.org148 Servers

Load older messages


SenderMessageTime
19 Mar 2025
@elvishjerricco:matrix.orgElvishJerriccoand it's really weird because you wouldn't need mountfsd (and the authentication craziness it entails) if you did directory based containers10:10:22
@steveej0:matrix.orgsteveejmaybe the systemd folks are open to implementing the gap. i'd be surprised as there doesn't seem to be much demand for systemd-nspawn in general10:14:53
@elvishjerricco:matrix.orgElvishJerriccosystemd-nspawn and systemd-vmspawn were designed first and foremost as tools to test an OS with, not so much a proper containerization / virtualization framework10:16:16
@elvishjerricco:matrix.orgElvishJerriccoof course nspawn has evolved a lot since10:16:37
@elvishjerricco:matrix.orgElvishJerricco But yea I don't really understand why directory based nspawn isn't possible unprivileged. That really does seem like the easier thing to do unprivileged 10:17:46
@elvishjerricco:matrix.orgElvishJerriccoso I bet it just wasn't the priority of whoever implemented unprivileged operation so they didn't do it10:18:08
@magic_rb:matrix.redalder.orgmagic_rbWouldnt it be better to just use runc for this? I do use nspawn but like, runc exists10:18:48
@elvishjerricco:matrix.orgElvishJerriccowell, if you wanna rewrite the nixos containers system with runc then be my guest :)10:19:42
@magic_rb:matrix.redalder.orgmagic_rb:) might try tbh, when i finish my bachelor. I do kind of want a better system which would be declarative but not really. (Split the eval into parts but make sure everything updates in tandem)10:20:46
@steveej0:matrix.orgsteveeji'm up for integrating a rust-based container runtime with nixos-containers, just in case i had to change something about it.10:21:14
@magic_rb:matrix.redalder.orgmagic_rbI dont think it would need any actual programming, if we were to bolt runc on the bottom10:21:49
@magic_rb:matrix.redalder.orgmagic_rbJust a healthy amount of nix and maybe some bash10:21:56
@magic_rb:matrix.redalder.orgmagic_rb Ill try to retarget my ucontainer thing i use to run NixNG containers on top of runc first tho 10:22:30
@elvishjerricco:matrix.orgElvishJerricco do other container systems integrate as nicely with systemd as nspawn does? e.g. nspawn will use sd_notify to signal when the container is ready, so that you can order units after container@foo.service and have that mean the right thing 10:24:37
@elvishjerricco:matrix.orgElvishJerricco or systemctl status container@foo.service shows you the unit hierarchy of the container 10:24:51
@lotte:chir.rs@lotte:chir.rs
In reply to @elvishjerricco:matrix.org
do other container systems integrate as nicely with systemd as nspawn does? e.g. nspawn will use sd_notify to signal when the container is ready, so that you can order units after container@foo.service and have that mean the right thing
OH
10:25:14
@lotte:chir.rs@lotte:chir.rsi was confused on that front10:25:29
@lotte:chir.rs@lotte:chir.rsi was wondering how to depend on container@postgres.service and actually have another service/container start when postgres is ready?10:25:57
@magic_rb:matrix.redalder.orgmagic_rb
In reply to @elvishjerricco:matrix.org
do other container systems integrate as nicely with systemd as nspawn does? e.g. nspawn will use sd_notify to signal when the container is ready, so that you can order units after container@foo.service and have that mean the right thing
Not really i guess, but its not impossible to get working. You can use SDNOTIFY the socket from within the container to signal ready when you reach multi-user.target manually
10:26:13
@magic_rb:matrix.redalder.orgmagic_rbI had to script that for NixNG as its not running systemd so systemd wont do it itself10:26:30
@elvishjerricco:matrix.orgElvishJerricco I think it'll signal that it's started when default.target is reached 10:26:38
@magic_rb:matrix.redalder.orgmagic_rbAlso i think systemd on the inside doesnt care at all about the outside runtime. Itll signal ready if it sees the socket, so it might just work10:26:53
@magic_rb:matrix.redalder.orgmagic_rbI seem to recall that from reading the code10:27:06
@elvishjerricco:matrix.orgElvishJerricconeat10:27:14
@lotte:chir.rs@lotte:chir.rswhich like i didn’t see much documentation on this so i thought this was simply unsupported10:27:25
@magic_rb:matrix.redalder.orgmagic_rb Ill try with runc, will add it to my infinite list of side projects 10:27:36
@lotte:chir.rs@lotte:chir.rseven though, honestly, kinda important10:27:36
@elvishjerricco:matrix.orgElvishJerriccoyea it wouldn't surprise me if systemd just knows how to do this stuff implicitly and nspawn isn't actually doing anything special10:27:43
@magic_rb:matrix.redalder.orgmagic_rbThere might be quirks if we go for rootless, but nothing that couldnt be solved10:28:07
@steveej0:matrix.orgsteveej what i really like about systemd-nspawn is the integration with machinectl and journalctl -M and journalctl -m 10:36:35

Show newer messages


Back to Room ListRoom Version: 10