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