!tCyGickeVqkHsYjWnh:nixos.org

NixOS Networking

902 Members
Declaratively manage your switching, routing, wireless, tunneling and more.264 Servers

Load older messages


SenderMessageTime
28 Jul 2025
@emilazy:matrix.orgemilyis it the end of the world if they do?20:31:05
@emilazy:matrix.orgemilyyou could imagine having a base networkd config used on all devices to get a basic uplink but then you have some fancy stuff using ifstate. dunno :)20:31:20
@emilazy:matrix.orgemilylike, you can also have both networkd and NM enabled, and it is fine as long as you do not try to configure the same interface with both20:31:43
@marcel:envs.netMarcelthey wonder why the changes do not apply and get overriden by ifstate, maybe even depeing on the order and between ifstate and networkd it could bing randomness demending which is faster20:31:49
@marcel:envs.netMarcelifstate is nice, because it deconfigures everything not defined20:32:07
@marcel:envs.netMarcelits truly declarative20:32:13
@emilazy:matrix.orgemily
## ignore settings to ignore existing interface, ip addresses, … (optional)
# ignore: …
20:32:20
@emilazy:matrix.orgemilyit looks like you can explicitly tell ifstate to ignore stuff you don't want it to manage20:32:28
@marcel:envs.netMarcelexcept for the ignore part20:32:30
@emilazy:matrix.orgemilyI think it is okay not to try and guard against everything as long as the obvious things are covered20:32:49
@marcel:envs.netMarcelstuff like docker or libvirt managed interfaces should be there20:32:52
@emilazy:matrix.orgemilypeople can always run … some other random software that tries to tweak networking config :)20:32:55
@emilazy:matrix.orgemilyand run into issues like that20:33:01
@emilazy:matrix.orgemily I would just assert on useDHCP and NetworkManager 20:33:13
@marcel:envs.netMarcelok20:33:18
@emilazy:matrix.orgemily you could get fancy with config.systemd.network.{networks,netdevs,links} but I think it is not worth it 20:33:55
@marcel:envs.netMarcelbut to do it corrently i also had to interpret the ignore section of ifstate20:34:21
@marcel:envs.netMarcel * 20:34:31
@emilazy:matrix.orgemilylike20:36:15
@emilazy:matrix.orgemily you are also not asserting on networking.interfaces.* 20:36:25
@emilazy:matrix.orgemily which can make scripted networking try to control things, even if useDHCP is off 20:36:30
@emilazy:matrix.orgemily when we flip networking.useNetworkd on by default, that stuff will be backed by boot.initrd.systemd.network.enable 20:36:32
@emilazy:matrix.orgemilybut the semantics won't have changed20:36:33
@elvishjerricco:matrix.orgElvishJerriccoI think it is safe to assume that if someone is enabling ifstate they are not configuring other network management tools, and therefore it's ok to only have the bare minimum of assertions to ensure that20:37:35
29 Jul 2025
@marcel:envs.netMarcelIs there no systemd equivaltent to copy_bin_and_libs? When i use systemd.storePaths, the libs are missing. Because this is a python script it is quite annoying to specify every store path needed seperatly.06:49:34
@elvishjerricco:matrix.orgElvishJerricco
In reply to @marcel:envs.net
Is there no systemd equivaltent to copy_bin_and_libs? When i use systemd.storePaths, the libs are missing. Because this is a python script it is quite annoying to specify every store path needed seperatly.
I don't think we've ever tried to do Python in systemd initrd... that's indeed a new challenge. Likely the only reason it works in scripted is because it copies the whole Python program's closure, which would mean your initrd is drastically larger than necessary
07:00:32
@elvishjerricco:matrix.orgElvishJerricco yea, indeed, copy_bin_and_libs ${getExe ifstate} on your branch results in a non-functional nuke-refs'd program, and using the program outside of extra-utils instead pulls in the whole closure for a whopping 75M of initrd size. 07:22:17
@elvishjerricco:matrix.orgElvishJerricco * yea, indeed, copy_bin_and_libs ${getExe ifstate} on your branch results in a non-functional nuke-refs'd program, and using the program outside of extra-utils instead pulls in the whole closure for a whopping 75M increase of compressed initrd size. 07:22:41
@elvishjerricco:matrix.orgElvishJerriccoso getting python to behave well for initrd is going to be... tricky07:23:09
@elvishjerricco:matrix.orgElvishJerriccoluckily systemd initrd gives you more control over this sort of thing, but I'm not sure what the right approach is going to be07:24:25

Show newer messages


Back to Room ListRoom Version: 6