nixpkgs/nixos/modules
Majiir Paktu c4228b6c8f nixos/network-interfaces-systemd: fix DHCP setting
The networkd backend logic for setting DHCP= on an interface is bugged
and inconsistent with the scripted logic. Consider this simple NixOS
configuration:

    {
      networking.useNetworkd = true;
      networking.interfaces.eth0.wakeOnLan.enable = true;
    }

The default value of networking.useDHCP is true, so we expect our eth0
interface to have DHCP enabled. With the scripted backend, this works.
But the networkd backend generates the following 40-eth0.network file:

    [Match]
    Name=eth0

    [Network]
    DHCP=no
    IPv6PrivacyExtensions=kernel

This is happening because the wakeOnLan configuration creates a key in
networking.interfaces, and the networkd backend erroneously checks that
instead of for explicitly configured IP addresses as in the scripted
backend. The documentation is also inconsistent across various options.

This change aligns the networkd backend and option documentation to the
actual behavior of the scripted backend, and updates a test to account
for this behavior for both backends.
2023-10-14 13:57:32 -04:00
..
config nixos: don't implicitly map missing user groups to nogroup 2023-10-06 19:33:01 +02:00
hardware treewide: use pkgs.config instead of config.nixpkgs.config 2023-10-01 20:48:40 +03:00
i18n/input-method uim: remove qt4, fix qt5 2023-09-04 13:54:50 +02:00
image nixos/image: fix for systemd 254 2023-09-13 12:03:50 +02:00
installer nixos/installer: mention search.nixos.org 2023-09-18 14:38:26 +02:00
misc nixos/locate: cleanup optional parenthesis 2023-10-03 00:19:57 +02:00
profiles systemd-stage-1: Default to full systemd build. 2023-10-04 04:21:35 -04:00
programs Merge pull request #256407 from Ma27/motd-ordering 2023-10-04 19:25:18 +02:00
security nixos/security/wrappers: use musl rather than glibc and explicitly unset insecure env vars 2023-10-05 22:04:05 +00:00
services Merge pull request #152631 from jonringer/pgmanage-use-package 2023-10-07 00:05:58 +03:00
system Merge pull request #258920 from ElvishJerricco/systemd-stage-1-full-build 2023-10-04 12:02:36 +03:00
tasks nixos/network-interfaces-systemd: fix DHCP setting 2023-10-14 13:57:32 -04:00
testing Merge pull request #219106 from m-bdf/nixos-testing-increase-device-timeout 2023-06-20 11:48:45 +02:00
virtualisation nixos/qemu-vm: optionally disable overriding fileSystems 2023-10-02 11:13:26 +02:00
module-list.nix Merge pull request #253548 from Quantenzitrone/rimgo 2023-10-06 17:50:58 +02:00
rename.nix nodePackages.tedicross: drop 2023-09-13 15:00:38 -07:00