diff --git a/nixos/modules/config/iproute2.nix b/nixos/modules/config/iproute2.nix index 90f53c0eab69..1fa28a7a4c64 100644 --- a/nixos/modules/config/iproute2.nix +++ b/nixos/modules/config/iproute2.nix @@ -1,15 +1,12 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.networking.iproute2; in { options.networking.iproute2 = { - enable = mkEnableOption "copying IP route configuration files"; - rttablesExtraConfig = mkOption { - type = types.lines; + 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 @@ -17,7 +14,7 @@ in }; }; - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { environment.etc."iproute2/rt_tables.d/nixos.conf" = { mode = "0644"; text = cfg.rttablesExtraConfig;