!PSmBFWNKoXmlQBzUQf:helsinki-systems.de

Stage 1 systemd

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

Load older messages


SenderMessageTime
12 Oct 2022
@flokli:matrix.orgflokliYou don't need to only match by name. Obviously, doing this on /all/ interfaces no matter what breaks some stuff in odd ways.18:57:42
@elvishjerricco:matrix.org@elvishjerricco:matrix.org flokli: Right IIRC networking.interfaces.<name>.useDHCP results in a network file that matches the interface name exactly, but networking.useDHCP uses some highly generic glob like en* or something like that 18:58:39
@elvishjerricco:matrix.org@elvishjerricco:matrix.orghttps://github.com/NixOS/nixpkgs/blob/master/nixos/modules/tasks/network-interfaces-systemd.nix#L76-L11319:00:16
14 Oct 2022
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgGot the auto-interface thing working roughly the same as the old scripted initrd way. It's not super pretty but it's probably good enough. I'll push a commit later after I format the syntax it so I don't look like a lunatic08:14:09
@phaer:matrix.orgPaul Haerle
In reply to @elvishjerricco:matrix.org
I dunno if we want that by default but I could see a configurable option for it
I could to a PR against your branch with an option to enable resolved, libnss_dns and cacert certificates and if you want? Or should that be separate options? i.e. boot.initrd.systemd.network.resolvd.enable & boot.initrd.systemd.network.cacertPackage? The later would keep it fairly customizable as in https://github.com/NixOS/nixpkgs/blob/nixos-22.05/nixos/modules/security/ca.nix#L9
12:40:15
@phaer:matrix.orgPaul Haerle
In reply to @elvishjerricco:matrix.org
I dunno if we want that by default but I could see a configurable option for it
* I could do a PR against your branch with an option to enable resolved, libnss_dns and cacert certificates and if you want? Or should that be separate options? i.e. boot.initrd.systemd.network.resolvd.enable & boot.initrd.systemd.network.cacertPackage? The later would keep it fairly customizable as in https://github.com/NixOS/nixpkgs/blob/nixos-22.05/nixos/modules/security/ca.nix#L9
12:40:23
@phaer:matrix.orgPaul Haerle * I could do a PR against your branch with an option to enable resolved, libnss_dns and cacert certificates if you want? Or should that be separate options? i.e. boot.initrd.systemd.network.resolvd.enable & boot.initrd.systemd.network.cacertPackage? The later would keep it fairly customizable as in https://github.com/NixOS/nixpkgs/blob/nixos-22.05/nixos/modules/security/ca.nix#L9 12:40:37
15 Oct 2022
@tinybronca:sibnsk.net@tinybronca:sibnsk.net changed their display name from underpantsgnome to underpantsgnome!.00:31:24
16 Oct 2022
@uep:matrix.org@uep:matrix.org joined the room.05:33:25
@nirahv:matrix.orgKanashi Mia changed their display name from Nirahv Kanashi Mia to Kanashi Mia.19:14:18
17 Oct 2022
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgHow does this look for automatically configuring interfaces? https://github.com/NixOS/nixpkgs/pull/169116/commits/22a7e62a99961c75849f81d8e14328b63844028600:01:03
@elvishjerricco:matrix.org@elvishjerricco:matrix.org * How does this look for automatically configuring interfaces? https://github.com/NixOS/nixpkgs/pull/169116/commits/48295a255a11aa29a8d1efe46b07c69b5967044d00:28:30
@elvishjerricco:matrix.org@elvishjerricco:matrix.org * How does this look for automatically configuring interfaces? https://github.com/NixOS/nixpkgs/pull/169116/commits/2d0fc0feeccc5d18da2a04cc844f68b210b556ef00:32:09
20 Oct 2022
@colemickens:matrix.orgcolemickensSo that will use networking.interfaces to auto-configure stage-1 networking? But it doesn't seem to hoist my manually configured systemd networks into the initrd config? It feels like a bit of a mismatch to me (or maybe I've misunderstood some detail and ma getting the wrong impression from building my systems)07:18:55
@elvishjerricco:matrix.org@elvishjerricco:matrix.org colemickens: well the point of configuring networking.interfaces in stage 1 for compatibility with scripted initrd's networking implementation, and because it's just very convenient. We can't rely on hoisting stage 2 systemd-networkd configs into stage 1 because A) not everyone using initrd networking is using systemd-networkd, and B) not everything you would configure in stage 2 should be configured in stage 1, e.g. wireguard 07:23:17
@elvishjerricco:matrix.org@elvishjerricco:matrix.org * colemickens: well the point of configuring networking.interfaces in stage 1 for compatibility with scripted initrd's networking implementation, and because it's just very convenient. We can't rely on hoisting stage 2 systemd-networkd configs into stage 1 because A) not everyone using initrd networking is using systemd-networkd, and B) not everything you would configure in stage 2 with systemd-networkd should be configured in stage 1, e.g. wireguard 07:24:03
@elvishjerricco:matrix.org@elvishjerricco:matrix.org * colemickens: well the point of configuring networking.interfaces in stage 1 is for compatibility with scripted initrd's networking implementation, and because it's just very convenient. We can't rely on hoisting stage 2 systemd-networkd configs into stage 1 because A) not everyone using initrd networking is using systemd-networkd, and B) not everything you would configure in stage 2 with systemd-networkd should be configured in stage 1, e.g. wireguard 07:24:15
@elvishjerricco:matrix.org@elvishjerricco:matrix.org I suppose it should probably only work that way when boot.initrd.network.enable = true;. i.e. if you just want to manually configure it, you should be able to set boot.initrd.systemd.network.enable = true; and configure it like stage 2, potentially even doing boot.initrd.systemd.network = config.systemd.network; 07:32:26
@colemickens:matrix.orgcolemickensI think that's why I was confused, yes. I was getting the warning for all of my hosts, when I only opt into intird networking on a couple.07:45:32
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgoh wait wut07:46:29
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgthe warning should definitely not show up if you don't have networking enabled in initrd, even in the current iteration07:47:04
* @colemickens:matrix.orgcolemickens better just use nix eval to confirm07:47:34
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgoh i may have goofed and made the warning show up when initrd networking is disabled...07:48:36
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgyea I did the goof07:50:03
@elvishjerricco:matrix.org@elvishjerricco:matrix.org just need an && <stuff> in the mkIf for the warning and assertion 07:50:24
@colemickens:matrix.orgcolemickensI'll repull the pr in a bit. Thanks!07:50:58
@elvishjerricco:matrix.org@elvishjerricco:matrix.org Ah, actually the current commit is wrong. The scripted initrd doesn't try to configure any interfaces if none are configured and networking.useDHCP = false;, whereas the commit currently defaults to the equivalent of networking.useDHCP = true; when there are no configured interfaces. 08:03:45
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgAnd the warning needs to go anyway, because this can be configured on the cmdline08:03:59
@elvishjerricco:matrix.org@elvishjerricco:matrix.org alright there we go. The auto configuration is only done if boot.initrd.network.enable, rather than boot.initrd.systemd.network.enable, meaning the latter gives you full control. And the warning about no networks being configured is gone, because scripted initrd also allowed you to not configure any interfaces, and you can configure them with the cmdline anyway 08:22:25
22 Oct 2022
@elvishjerricco:matrix.org@elvishjerricco:matrix.org

https://github.com/systemd/systemd/releases/tag/v252-rc2

    * Various units are now correctly ordered against
      initrd-switch-root.target where previously a conflict without
      ordering was configured. A stop job for those units would be queued,
      but without the ordering it could be executed only after
      initrd-switch-root.service, leading to units not being restarted in
      the host system as expected.

I wish they linked the PR that did this. I'd like to see what exactly changed

17:41:14

Show newer messages


Back to Room ListRoom Version: 6