mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
nixos/networking.iproute2: remove with lib;
This commit is contained in:
parent
6b9c5be4a6
commit
e514851c46
@ -1,15 +1,12 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.networking.iproute2;
|
cfg = config.networking.iproute2;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.networking.iproute2 = {
|
options.networking.iproute2 = {
|
||||||
enable = mkEnableOption "copying IP route configuration files";
|
enable = lib.mkEnableOption "copying IP route configuration files";
|
||||||
rttablesExtraConfig = mkOption {
|
rttablesExtraConfig = lib.mkOption {
|
||||||
type = types.lines;
|
type = lib.types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
description = ''
|
description = ''
|
||||||
Verbatim lines to add to /etc/iproute2/rt_tables
|
Verbatim lines to add to /etc/iproute2/rt_tables
|
||||||
@ -17,7 +14,7 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
environment.etc."iproute2/rt_tables.d/nixos.conf" = {
|
environment.etc."iproute2/rt_tables.d/nixos.conf" = {
|
||||||
mode = "0644";
|
mode = "0644";
|
||||||
text = cfg.rttablesExtraConfig;
|
text = cfg.rttablesExtraConfig;
|
||||||
|
Loading…
Reference in New Issue
Block a user