!PSmBFWNKoXmlQBzUQf:helsinki-systems.de

Stage 1 systemd

82 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 Mar 2022
@elvishjerricco:matrix.org@elvishjerricco:matrix.org though in the same vein, the script style options don't work right now either, though I certainly intend for them to be fixed 07:50:34
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.deokay so I'll remove these as well and we can re-add them when they work?07:51:22
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgSure07:51:59
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.deThey should work though08:41:41
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.de you call mkServiceConfig which evaluates the options 08:41:54
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.de

yeah this works:

    boot.initrd.systemd.services.test = {
      wantedBy = [ "initrd.target" ];
      script = ''
        echo lal
      '';
    };
08:51:54
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.deUpdated commit: https://github.com/helsinki-systems/nixpkgs/commit/62d4d08e9fd7f0a0d32349ef64731e31a841cb9c09:16:10
@elvishjerricco:matrix.org@elvishjerricco:matrix.org
In reply to @janne.hess:helsinki-systems.de

yeah this works:

    boot.initrd.systemd.services.test = {
      wantedBy = [ "initrd.target" ];
      script = ''
        echo lal
      '';
    };
wait how does that work... I never wrote any code that actually causes the generated script to be added to the initrd... It should produce unit file that fails to actually start because the script doesn't exist.
17:54:27
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.dehmm maybe systemd just said "OK" and it wasn't okay at all?17:55:04
@elvishjerricco:matrix.org@elvishjerricco:matrix.org
In reply to @janne.hess:helsinki-systems.de
Updated commit: https://github.com/helsinki-systems/nixpkgs/commit/62d4d08e9fd7f0a0d32349ef64731e31a841cb9c
And aww I had really hoped to avoid having a whole second set of things specially for initrd, but oh well. If that's the best way to accomplish this then so be it
17:56:41
@elvishjerricco:matrix.org@elvishjerricco:matrix.org
In reply to @janne.hess:helsinki-systems.de
hmm maybe systemd just said "OK" and it wasn't okay at all?
I'm guessing the unit failed to start, but systemd continued with the boot anyway. It'll just go as long as switch-root can succeed and nothing does anything like systemctl emergency or whatever
17:57:59
@elvishjerricco:matrix.org@elvishjerricco:matrix.org I thought about setting /etc/systemd/system/service.conf so that any unit that fails causes it to enter emergency mode, but I figure if the boot can proceed with a failed initrd unit, then maybe we should just let it? 17:59:04
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.de
In reply to @elvishjerricco:matrix.org
I thought about setting /etc/systemd/system/service.conf so that any unit that fails causes it to enter emergency mode, but I figure if the boot can proceed with a failed initrd unit, then maybe we should just let it?
Yeah, better have an incomplete boot than no boot at all
18:00:07
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.de
machine # [  OK  ] Started test.service.
machine # initrd.target: AssertPathExists=/etc/initrd-release succeeded.
machine # test.service: Failed to locate executable /nix/store/4lv9l9rgrsy8q5l29wycmdyx37wx0h3p-unit-script-test-start/bin/test-start: No such file or directory
machine # test.service: Failed at step EXEC spawning /nix/store/4lv9l9rgrsy8q5l29wycmdyx37wx0h3p-unit-script-test-start/bin/test-start: No such file or directory
18:03:09
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.deyou are right :(18:03:12
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.deis that important enough that we have to include it in the MVP?18:03:34
@elvishjerricco:matrix.org@elvishjerricco:matrix.org
In reply to @janne.hess:helsinki-systems.de
is that important enough that we have to include it in the MVP?
No
18:07:29
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgIt's just very nice to have :P18:07:42
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.deokay so I'll exclude these options as well18:07:45
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgsure18:07:52
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.deHere you go: https://github.com/helsinki-systems/nixpkgs/commit/0ba59f624e67d4ff44fa4ea63fe89cfd095e9ac418:10:35
@elvishjerricco:matrix.org@elvishjerricco:matrix.org Janne Heß: Looks like roberth has some suggestions on the PR. He doesn't like the mkServiceConfig thing; he found a cleaner way to do it with nixos modules. So I think he might have similar gripes with your forInitrd stuff... 18:17:10
@elvishjerricco:matrix.org@elvishjerricco:matrix.org * Janne Heß: Looks like roberth has some suggestions on the PR. He doesn't like the mkServiceConfig thing; he found a cleaner way to do it with module composition instead of functions that generate modules. So I think he might have similar gripes with your forInitrd stuff... 18:18:40
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.deYou go first, I'll fix my code afterwards ;)18:22:37
30 Mar 2022
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.de ElvishJerricco: Ping? :) Do you have time for the rebase somewhat soonish? 18:39:28
1 Apr 2022
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.deI pushed https://github.com/NixOS/nixpkgs/pull/164943/commits/5653209ed95985034bbb43bb63e04190639477a0 to make roberth happy and to have a more extensible way of specifying files11:28:14
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.de I'm sorry about that, bobvanderlinden. Your lvm attempts will now need to be refactored to the new options :/ (don't do it until we are sure we don't have to change it again!) 11:28:53
@elvishjerricco:matrix.org@elvishjerricco:matrix.org Janne Heß: Sorry I haven't been able to get to systemd-stage1 stuff this week. But I just looked at your new set of changes and I really like them! Thanks! 17:30:17
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.de
In reply to @elvishjerricco:matrix.org
Janne Heß: Sorry I haven't been able to get to systemd-stage1 stuff this week. But I just looked at your new set of changes and I really like them! Thanks!
Great, pleased to hear that. I hope the biggest reviews are over now
17:31:09
@elvishjerricco:matrix.org@elvishjerricco:matrix.org I really like the environment.etc-like contents option. It's a lot cleaner. 17:31:46

Show newer messages


Back to Room ListRoom Version: 6