diff options
Diffstat (limited to 'nixpkgs/nixos/modules/config/iproute2.nix')
-rw-r--r-- | nixpkgs/nixos/modules/config/iproute2.nix | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/nixpkgs/nixos/modules/config/iproute2.nix b/nixpkgs/nixos/modules/config/iproute2.nix new file mode 100644 index 000000000000..0cde57b759be --- /dev/null +++ b/nixpkgs/nixos/modules/config/iproute2.nix @@ -0,0 +1,26 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + cfg = config.networking.iproute2; +in +{ + options.networking.iproute2 = { + enable = mkEnableOption (lib.mdDoc "copying IP route configuration files"); + rttablesExtraConfig = mkOption { + type = types.lines; + default = ""; + description = lib.mdDoc '' + Verbatim lines to add to /etc/iproute2/rt_tables + ''; + }; + }; + + config = mkIf cfg.enable { + environment.etc."iproute2/rt_tables.d/nixos.conf" = { + mode = "0644"; + text = cfg.rttablesExtraConfig; + }; + }; +} |