| 20 Mar 2022 |
@elvishjerricco:matrix.org | So when you try to make the unit yourself, generateUnits will be like "Oh, that unit doesn't exist at all. I'll just make a regular unit then, not an override" | 17:42:22 |
@elvishjerricco:matrix.org | and then that regular unit will get shadowed by the /run unit from the generator | 17:42:42 |
bobvanderlinden | hmm, right | 17:42:49 |
@elvishjerricco:matrix.org | This is why I didn't immediately fix the issue myself :P I wasn't sure of a clean solution | 17:43:32 |
@elvishjerricco:matrix.org | But I'd be very happy to include it in this PR, as being able to boot one of these VMs, or have a NixOS test, is pretty core functionality IMO | 17:43:59 |
bobvanderlinden | it doesn't really need to override systemd-makefs@.service if the needed binaries are just here in sytemd's path 'globally'? | 17:44:57 |
@elvishjerricco:matrix.org | I suppose that's true. | 17:45:16 |
@elvishjerricco:matrix.org | We could like... add /bin to every unit's PATH somehow | 17:45:28 |
@elvishjerricco:matrix.org | not sure how to make that work for these generated /run units | 17:45:36 |
bobvanderlinden | in systemd.conf you can define the PATH | 17:45:58 |
@elvishjerricco:matrix.org | Ohh | 17:46:02 |
@elvishjerricco:matrix.org | that's good | 17:46:05 |
@elvishjerricco:matrix.org | Probably very much worth it | 17:46:12 |
bobvanderlinden | I was also thinking we could use a proper ini-settings option-type for those *.conf files, instead of the types.lines approach | 17:46:52 |
@elvishjerricco:matrix.org | I'd say lets just stick to the same API as stage 2 | 17:47:26 |
@elvishjerricco:matrix.org | I think that consistency is probably worthwhile | 17:47:45 |
bobvanderlinden | better for now indeed | 17:47:56 |
bobvanderlinden | to get the PR merged π
can always experiment with these things afterwards | 17:48:21 |
@elvishjerricco:matrix.org | I have to run for now. Let me know if the PATH thing and makefs/growfs work. Or if you're not messing with it right now I'll probably give it a go in an hour or two | 17:49:10 |
bobvanderlinden | meh, i need to go too for now. This is what I got atm: https://github.com/bobvanderlinden/nixpkgs/commit/49f374ed7cf234a99ecab41ab2f0b5359b088ae8 | 18:06:00 |
bobvanderlinden | I don't see it doing any makefs things yet:
machine # [ OK ] Found device /dev/vda.
machine # [ 2.398149] systemd-udevd[85]: Using default interface naming scheme 'v249'.
machine # Mounting /sysroot...
machine # [ 2.735262] EXT4-fs (vda): VFS: Can't find ext4 filesystem
machine # [ 2.514791] mount[110]: mount: /sysroot: wrong fs type, bad option, bad superblock on /dev/vda, missing codepage or helper program, or other error.
machine # sysroot.mount: Mount process exited, code=exited, status=32/n/a
machine # sysroot.mount: Failed with result 'exit-code'.
machine # [FAILED] Failed to mount /sysroot.
| 18:06:20 |
bobvanderlinden | aah, maybe those generator files aren't there yet in the right place on the initramfs:
/nix/store/mf3c2s2zfwn7i5j9ibca1md7gnhmxy91-systemd-minimal-249.7/lib/systemd/system-generators/systemd-fstab-generator -> /etc/systemd/system-generators/ | 18:08:04 |
@elvishjerricco:matrix.org | Systemd does actually implicitly know where its included generators are. That's why the fstab generator works | 18:13:16 |
@elvishjerricco:matrix.org | But yes, tangentially, we should create the proper generators directory | 18:13:34 |
bobvanderlinden | Ah, well I couldn't see that it ran the generator from the logs. Not sure what was up. Not looking at it atm (need some food π
) | 18:17:28 |
@elvishjerricco:matrix.org | Ok cool, I have makefs and growfs working | 19:33:23 |
@elvishjerricco:matrix.org | but yea like I thought, I have the IgnoreOnIsolate problem | 19:33:38 |
@elvishjerricco:matrix.org | bobvanderlinden: Janne HeΓ: I think I've fixed it now. Check out the latest two commits on the PR | 20:04:11 |
@elvishjerricco:matrix.org | And now I've added a bare minimum test case. Works just fine | 20:12:11 |
@janne.hess:helsinki-systems.de | one thing I was wondering: why always DefaultEnvironment=PATH=/bin:/sbin? Wouldn't it be cleaner to reference /nix directly? | 20:14:39 |