From 8a6d544eef846ffa418acdfa8bb0882314c3ba6a Mon Sep 17 00:00:00 2001 From: Aos Dabbagh <25783780+aos@users.noreply.github.com> Date: Sat, 30 Nov 2024 23:24:17 -0500 Subject: [PATCH] fix(networking): Use `true` instead of "yes" for multicast config I ran into an issue when I had clan + this module: https://github.com/nix-community/srvos/blob/ce61f7168038e4077ed6e27a4aa9f2c3c3500099/nixos/mixins/mdns.nix#L6 they both set the same config value, but clan uses "yes" and that module uses `true`. systemd allows for "yes" or `true` (`man systemd.syntax`), so I opted to change this to `true`. Here's the full error: ``` error: The option `systemd.network.networks."99-ethernet-default-dhcp".networkConfig.MulticastDNS' has conflicting definition values: - In `/nix/store/3yv22nq7rqd0ra30qvzc2d624rwa6h7c-source/nixosModules/clanCore/networking.nix': "yes" - In `/nix/store/ivjk0r776mxal8v7jamwsrn4yidvg0dv-source/nixos/mixins/mdns.nix': true Use `lib.mkForce value` or `lib.mkDefault value` to change the priority on any of these definitions. ``` --- nixosModules/clanCore/networking.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixosModules/clanCore/networking.nix b/nixosModules/clanCore/networking.nix index 4200d6744..f58ee4a85 100644 --- a/nixosModules/clanCore/networking.nix +++ b/nixosModules/clanCore/networking.nix @@ -103,8 +103,8 @@ systemd.services.NetworkManager-wait-online.enable = false; systemd.network.wait-online.enable = false; - systemd.network.networks."99-ethernet-default-dhcp".networkConfig.MulticastDNS = lib.mkDefault "yes"; - systemd.network.networks."99-wireless-client-dhcp".networkConfig.MulticastDNS = lib.mkDefault "yes"; + systemd.network.networks."99-ethernet-default-dhcp".networkConfig.MulticastDNS = lib.mkDefault true; + systemd.network.networks."99-wireless-client-dhcp".networkConfig.MulticastDNS = lib.mkDefault true; networking.firewall.allowedUDPPorts = [ 5353 ]; # Multicast DNS # Use networkd instead of the pile of shell scripts