3
0
Fork 0
forked from mirrors/nixpkgs

nixos/iproute2: use rt_tables.d to avoid IFD

This commit is contained in:
Lin Yinfeng 2023-10-27 17:28:37 +08:00
parent 7c2ff7ad03
commit b21e84ea8d
No known key found for this signature in database
GPG key ID: 46947CB61521FC42

View file

@ -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;
};
};
}