From 8b9a5020db5857ea0f4c8b3f711e502bd24b2015 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Sat, 24 Aug 2024 22:05:41 +0200 Subject: [PATCH] nixos/services.dictd: remove `with lib;` --- nixos/modules/services/misc/dictd.nix | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/nixos/modules/services/misc/dictd.nix b/nixos/modules/services/misc/dictd.nix index 6660d5e977ff..b11a87f28905 100644 --- a/nixos/modules/services/misc/dictd.nix +++ b/nixos/modules/services/misc/dictd.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.dictd; in @@ -14,19 +11,19 @@ in services.dictd = { - enable = mkOption { - type = types.bool; + enable = lib.mkOption { + type = lib.types.bool; default = false; description = '' Whether to enable the DICT.org dictionary server. ''; }; - DBs = mkOption { - type = types.listOf types.package; + DBs = lib.mkOption { + type = lib.types.listOf lib.types.package; default = with pkgs.dictdDBs; [ wiktionary wordnet ]; - defaultText = literalExpression "with pkgs.dictdDBs; [ wiktionary wordnet ]"; - example = literalExpression "[ pkgs.dictdDBs.nld2eng ]"; + defaultText = lib.literalExpression "with pkgs.dictdDBs; [ wiktionary wordnet ]"; + example = lib.literalExpression "[ pkgs.dictdDBs.nld2eng ]"; description = "List of databases to make available."; }; @@ -40,7 +37,7 @@ in config = let dictdb = pkgs.dictDBCollector { dictlist = map (x: { name = x.name; filename = x; } ) cfg.DBs; }; - in mkIf cfg.enable { + in lib.mkIf cfg.enable { # get the command line client on system path to make some use of the service environment.systemPackages = [ pkgs.dict ];