nixos/networking.iproute2: remove with lib;

This commit is contained in:
Felix Buehler 2024-08-27 20:42:47 +02:00
parent 6b9c5be4a6
commit e514851c46

View File

@ -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;