nixos/services.dictd: remove with lib;

This commit is contained in:
Felix Buehler 2024-08-24 22:05:41 +02:00
parent c4c90f5fbe
commit 8b9a5020db

View File

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