28 Jul 2025 |
hexa | it's one more thing we can point people to, to escape scripted networking | 20:27:10 |
ElvishJerricco | hexa (clat on linux when): (that is what they're working on :P) | 20:27:23 |
hexa | and e.g. if they require network namespaces | 20:27:24 |
Marcel | In reply to @hexa:lossy.network please bring ifstate upstream I am currenlty in the process ;D | 20:27:25 |
hexa | was only aware of the flake 🙂 | 20:27:33 |
hexa | backlog is hard | 20:27:40 |
ElvishJerricco | the networkmanager module just sets it to false | 20:28:05 |
emily | tbh, I hate overriding useDHCP from another module like that, but it's what NM and connman do, so it's probably the way to go | 20:28:06 |
emily | (I guess, mostly I dislike networking.useDHCP being on by default) | 20:28:21 |
emily | assertion is still good to have as a backstop | 20:28:31 |
Marcel | In reply to @emilazy:matrix.org assertion is still good to have as a backstop i've also done them for networkd and all the others | 20:28:46 |
emily | networking.useNetworkd will likely be on by default as well soon, FWIW | 20:29:10 |
emily | though it should be harmless if no interfaces are defined etc. | 20:29:16 |
emily | I think systemd-networkd will ignore everything that isn't explicitly configured | 20:29:28 |
emily | networking.useDHCP and networking.networkmanager.enable are a bit different in that they look at "everything" | 20:29:53 |
emily | shouldn't need to assert against networkd itself | 20:30:04 |
Marcel | https://github.com/MarcelCoding/nixpkgs/blob/ifstate/nixos/modules/services/networking/ifstate.nix#L115-L126
The problem is how do I enshure the user does not configure stuff in networkd? | 20:30:47 |
emily | is it the end of the world if they do? | 20:31:05 |
emily | you 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 |
emily | like, 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 both | 20:31:43 |
Marcel | they 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 faster | 20:31:49 |
Marcel | ifstate is nice, because it deconfigures everything not defined | 20:32:07 |
Marcel | its truly declarative | 20:32:13 |
emily | ## ignore settings to ignore existing interface, ip addresses, … (optional)
# ignore: …
| 20:32:20 |
emily | it looks like you can explicitly tell ifstate to ignore stuff you don't want it to manage | 20:32:28 |
Marcel | except for the ignore part | 20:32:30 |
emily | I think it is okay not to try and guard against everything as long as the obvious things are covered | 20:32:49 |
Marcel | stuff like docker or libvirt managed interfaces should be there | 20:32:52 |
emily | people can always run … some other random software that tries to tweak networking config :) | 20:32:55 |
emily | and run into issues like that | 20:33:01 |