| 19 Mar 2022 |
bobvanderlinden | * I'll just ditch the pr-reusable-systemd-modules branch, as I think it'll never get approved and I don't see a better way with the current module system | 11:15:16 |
@elvishjerricco:matrix.org | bobvanderlinden: I think I need to get the very basic thing reconstructed before we can start to parallelize implementations of the various initrd features | 11:15:39 |
@elvishjerricco:matrix.org | Luckily, given that I've done this four times now, and I think I have a really solid foundation (with much thanks to your branch!), I think this could be fairly quick to construct | 11:16:12 |
bobvanderlinden | awesome 👍️ let me know when 😄 | 11:16:26 |
@elvishjerricco:matrix.org | oh crap | 11:16:57 |
@elvishjerricco:matrix.org | generateUnits adds a bunch of crappy default units | 11:17:09 |
@elvishjerricco:matrix.org | like nix-daemon.service | 11:17:13 |
@elvishjerricco:matrix.org | that's gonna be a problem... | 11:17:17 |
@elvishjerricco:matrix.org | I was so excited "I'm just gonna call generateUnits, then either do my Exec* parsing or cherry-pick bobvanderlinden's change, and then it should boot!" | 11:17:56 |
@elvishjerricco:matrix.org | Of course it's not that simple... | 11:18:01 |
bobvanderlinden | is that because of it referring to config.systemd.packages? | 11:18:10 |
@elvishjerricco:matrix.org | Oh if it's doing that all on its own then I'm going to have to parameterize this thing... | 11:18:40 |
@elvishjerricco:matrix.org | Yea... yea it's doing that | 11:18:59 |
bobvanderlinden | make cfg part of the arguments of generateUnits' I'd say | 11:19:01 |
@elvishjerricco:matrix.org | This thing is getting way too many positional arguments. I'm gonna make it an attrset argument | 11:20:46 |
bobvanderlinden | haha, exactly what I was thinking 😄 it's a messy function atm | 11:21:17 |
@elvishjerricco:matrix.org | Hell yea, that worked | 11:26:56 |
@elvishjerricco:matrix.org | Sweet, the regular old systemd options are generating a proper unit directory. Awesom | 12:46:57 |
@elvishjerricco:matrix.org | Sweet. Looks like I just have to fix the slightly wrong file system code for the qemu-vm module and then I'll have a VM that boots. | 13:52:03 |
@elvishjerricco:matrix.org | bobvanderlinden: Btw the reason you had to force it to load ext4 was because /proc/sys/kernel/modprobe wasn't set to a real modprobe program. I solved this by putting kernel.modprobe = /bin/modprobe in /etc/sysctl.d/nixos.conf | 13:52:53 |
@elvishjerricco:matrix.org | It's honestly remarkable how much simpler this branch is than all my previous attempts, and it's easily the most useful version of it anyway | 13:53:39 |
@arianvp:matrix.org | That's a good sign | 14:13:06 |
@elvishjerricco:matrix.org | Currently it's 26M, which is way too big. | 14:25:57 |
@elvishjerricco:matrix.org | But, I'm forcing it to include all of ${glibc}/lib because there's some dynamically loaded library that is required to start the recovery shell (not to boot though), and I'm not using systemdMinimal because that wouldn't include cryptsetup. | 14:25:59 |
@elvishjerricco:matrix.org | If I don't do the glibc thing and I use systemdMinimal, then it's just 13M, which is actually really good | 14:26:26 |
@elvishjerricco:matrix.org | Using systemdMinimal.override { withCryptsetup = true; } brings it to 15M, which isn't so bad | 14:26:51 |
@elvishjerricco:matrix.org | Oh, hah, nevermind. If you actually try to run the thing with systemdMinimal then it just doesn't work at all | 14:29:25 |
@elvishjerricco:matrix.org | Ah no I'm wrong, it boots just fine. I just screwed it up | 14:48:21 |
bobvanderlinden | That sounds quite promising. I was wondering whether booting with minimal would work when the root runs on non-minimal. Probably fine, but hadn't tried that yet. | 15:15:15 |
bobvanderlinden |
bobvanderlinden: Btw the reason you had to force it to load ext4 was because /proc/sys/kernel/modprobe wasn't set to a real modprobe program. I solved this by putting kernel.modprobe = /bin/modprobe in /etc/sysctl.d/nixos.conf
Ah haha that makes sense. I didn't know about this option and what trying to figure out why udevd wasn't calling modprobe. Good to hear that workaround is ironed out 👍👍 | 17:04:15 |