504525a148
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
26 lines
555 B
Nix
26 lines
555 B
Nix
{ 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;
|
|
};
|
|
};
|
|
}
|