Unverified Commit bcc20cad authored by Ryan Lahfa's avatar Ryan Lahfa Committed by GitHub
Browse files

nixos/network-interfaces: let networkd handle privacy extensions (#431967)

parents 4b6377f1 bb954cdd
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -1884,6 +1884,11 @@ let
  networkdOptions = {
    networkConfig = mkOption {
      default = { };
      defaultText = lib.literalExpression ''
        {
          IPv6PrivacyExtensions = true;
        }
      '';
      example = {
        SpeedMeter = true;
        ManageForeignRoutingPolicyRules = false;
@@ -3127,7 +3132,10 @@ let
      };

      config = {
        networkConfig = optionalAttrs (config.routeTables != { }) {
        networkConfig = {
          IPv6PrivacyExtensions = lib.mkOptionDefault true;
        }
        // optionalAttrs (config.routeTables != { }) {
          RouteTable = mapAttrsToList (name: number: "${name}:${toString number}") config.routeTables;
        };
      };
+137 −136
Original line number Diff line number Diff line
@@ -1813,7 +1813,8 @@ in

    virtualisation.vswitch = mkIf (cfg.vswitches != { }) { enable = true; };

    services.udev.packages = [
    services.udev.packages =
      lib.optionals (!config.systemd.network.enable) [
        (pkgs.writeTextFile rec {
          name = "ipv6-privacy-extensions.rules";
          destination = "/etc/udev/rules.d/98-${name}";