From 22e80f8189da77f2097d3b026c1d705dd7bf9a41 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Wed, 28 Aug 2024 20:33:29 +0200 Subject: [PATCH] nixos/modules/services/networking/v2ray.nix: remove `with lib;` --- nixos/modules/services/networking/v2ray.nix | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/nixos/modules/services/networking/v2ray.nix b/nixos/modules/services/networking/v2ray.nix index 2ee931177b69df..7cfefdafd0258c 100644 --- a/nixos/modules/services/networking/v2ray.nix +++ b/nixos/modules/services/networking/v2ray.nix @@ -1,13 +1,10 @@ { config, lib, pkgs, ... }: - -with lib; - { options = { services.v2ray = { - enable = mkOption { - type = types.bool; + enable = lib.mkOption { + type = lib.types.bool; default = false; description = '' Whether to run v2ray server. @@ -16,10 +13,10 @@ with lib; ''; }; - package = mkPackageOption pkgs "v2ray" { }; + package = lib.mkPackageOption pkgs "v2ray" { }; - configFile = mkOption { - type = types.nullOr types.str; + configFile = lib.mkOption { + type = lib.types.nullOr lib.types.str; default = null; example = "/etc/v2ray/config.json"; description = '' @@ -31,8 +28,8 @@ with lib; ''; }; - config = mkOption { - type = types.nullOr (types.attrsOf types.unspecified); + config = lib.mkOption { + type = lib.types.nullOr (lib.types.attrsOf lib.types.unspecified); default = null; example = { inbounds = [{ @@ -68,7 +65,7 @@ with lib; ''; }; - in mkIf cfg.enable { + in lib.mkIf cfg.enable { assertions = [ { assertion = (cfg.configFile == null) != (cfg.config == null);