at 25.11-pre 545 B view raw
1{ 2 config, 3 lib, 4 pkgs, 5 ... 6}: 7let 8 cfg = config.networking.iproute2; 9in 10{ 11 options.networking.iproute2 = { 12 enable = lib.mkEnableOption "copying IP route configuration files"; 13 rttablesExtraConfig = lib.mkOption { 14 type = lib.types.lines; 15 default = ""; 16 description = '' 17 Verbatim lines to add to /etc/iproute2/rt_tables 18 ''; 19 }; 20 }; 21 22 config = lib.mkIf cfg.enable { 23 environment.etc."iproute2/rt_tables.d/nixos.conf" = { 24 mode = "0644"; 25 text = cfg.rttablesExtraConfig; 26 }; 27 }; 28}