From b21e84ea8d1db73e3cc7e9f0ec999ed79257e62e Mon Sep 17 00:00:00 2001 From: Lin Yinfeng Date: Fri, 27 Oct 2023 17:28:37 +0800 Subject: nixos/iproute2: use rt_tables.d to avoid IFD --- nixos/modules/config/iproute2.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nixos/modules/config/iproute2.nix b/nixos/modules/config/iproute2.nix index 78bd07d680e2..0cde57b759be 100644 --- a/nixos/modules/config/iproute2.nix +++ b/nixos/modules/config/iproute2.nix @@ -18,10 +18,9 @@ in }; config = mkIf cfg.enable { - environment.etc."iproute2/rt_tables" = { + environment.etc."iproute2/rt_tables.d/nixos.conf" = { mode = "0644"; - text = (fileContents "${pkgs.iproute2}/lib/iproute2/rt_tables") - + (optionalString (cfg.rttablesExtraConfig != "") "\n\n${cfg.rttablesExtraConfig}"); + text = cfg.rttablesExtraConfig; }; }; } -- cgit 1.4.1