!PSmBFWNKoXmlQBzUQf:helsinki-systems.de

Stage 1 systemd

78 Members
systemd in NixOs's stage 1, replacing the current bash tooling https://github.com/NixOS/nixpkgs/projects/5126 Servers

Load older messages


SenderMessageTime
29 May 2023
@elvishjerricco:matrix.org@elvishjerricco:matrix.org
In reply to @winterqt:nixos.dev
why that ordering (well, when it works) or hexa's, over mine? is there something wrong about mine? (i have no idea what i'm doing)
The problem with your ordering was that you have both Before and After on local-fs.target
01:25:31
@winterqt:nixos.devWinter (she/her)right, but what if I set DefaultDependencies = no?01:25:45
@winterqt:nixos.devWinter (she/her)as hexa's does01:25:49
@elvishjerricco:matrix.org@elvishjerricco:matrix.org because without DefaultDependencies=no, After=local-fs.target is a (transitive) default dependency 01:25:49
@elvishjerricco:matrix.org@elvishjerricco:matrix.org Then it's still not right because initrd uses initrd-fs.target instead of local-fs.target 01:26:17
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgor rather01:26:19
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgit uses both01:26:21
@winterqt:nixos.devWinter (she/her)ah, okay.01:26:24
@elvishjerricco:matrix.org@elvishjerricco:matrix.org but initrd-fs.target is your host file systems 01:26:31
@winterqt:nixos.devWinter (she/her)so sysroot.mount + initrd-fs.target are the way to go, i guess?01:26:41
@elvishjerricco:matrix.org@elvishjerricco:matrix.org while local-fs.target is stage 1 specific file systems 01:26:42
@elvishjerricco:matrix.org@elvishjerricco:matrix.org initrd-fs.target depends on sysroot.mount already 01:26:55
@elvishjerricco:matrix.org@elvishjerricco:matrix.org so if you just want a fully configured sysroot, with all child file systems, After=initrd-fs.target is all you need 01:27:23
@elvishjerricco:matrix.org@elvishjerricco:matrix.org sysroot.mount is just if you only care about the root fs only 01:27:40
@elvishjerricco:matrix.org@elvishjerricco:matrix.org oh but if you mean you want to be before things are mounted, then yea you want Before=sysroot.mount 01:28:12
@winterqt:nixos.devWinter (she/her) what if I want to go before sysroot (so Before = sysroot.mount), but after device nodes are created, and I don't care about anything else? do I just do Before = sysroot.mount, After = local-fs.target (so I get /dev?) 01:28:27
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgwell01:28:42
@elvishjerricco:matrix.org@elvishjerricco:matrix.org the best thing to do is have After= on the specific device you want 01:28:55
@elvishjerricco:matrix.org@elvishjerricco:matrix.org in an ideal world we'd have Lily Foster's patch and you could do After=initrd-root-device.target to wait for whatever the root fs's device is 01:29:21
@winterqt:nixos.devWinter (she/her)ah, okay01:29:30
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgbut that's still not "all devices" since that's not really a thing in udev01:29:34
@winterqt:nixos.devWinter (she/her)
In reply to @elvishjerricco:matrix.org
the best thing to do is have After= on the specific device you want
how do I find that?
01:29:44
@elvishjerricco:matrix.org@elvishjerricco:matrix.org Winter (she/her): What specifically are you trying to do? We may have an X Y problem here 01:30:05
@winterqt:nixos.devWinter (she/her)ephemeral rootfs, so I kind of need that ordering01:30:39
@winterqt:nixos.devWinter (she/her)not ZFS though, so I can't rely on the ZFS import services01:30:56
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgso how are you achieving ephemeral rootfs then?01:31:16
@winterqt:nixos.devWinter (she/her)

btrfs:

    mkdir /scratch
    mount /dev/mapper/nixos /scratch

    btrfs subvolume delete /scratch/root/srv
    btrfs subvolume delete /scratch/root/var/lib/portables
    btrfs subvolume delete /scratch/root/var/lib/machines
    btrfs subvolume delete /scratch/root

    btrfs subvolume snapshot /scratch/root-blank /scratch/root

    umount /scratch
    rm -r /scratch
01:32:26
@winterqt:nixos.devWinter (she/her)oh, i could use cryptsetup.target01:32:46
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgI se01:32:55
@elvishjerricco:matrix.org@elvishjerricco:matrix.org * I see01:32:56

Show newer messages


Back to Room ListRoom Version: 6