mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 19:21:04 +00:00
24 lines
537 B
Nix
24 lines
537 B
Nix
{ config, lib, pkgs, ... }:
|
|
let
|
|
cfg = config.networking.iproute2;
|
|
in
|
|
{
|
|
options.networking.iproute2 = {
|
|
enable = lib.mkEnableOption "copying IP route configuration files";
|
|
rttablesExtraConfig = lib.mkOption {
|
|
type = lib.types.lines;
|
|
default = "";
|
|
description = ''
|
|
Verbatim lines to add to /etc/iproute2/rt_tables
|
|
'';
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
environment.etc."iproute2/rt_tables.d/nixos.conf" = {
|
|
mode = "0644";
|
|
text = cfg.rttablesExtraConfig;
|
|
};
|
|
};
|
|
}
|