diff options
author | Edward Tjörnhammar <ed@cflags.cc> | 2016-10-31 13:08:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-31 13:08:57 +0100 |
commit | f7ad0c0fd5f1fddf8f3290bcb7164302802be42e (patch) | |
tree | 51d6c18cb538b9628db6f510db0ef56a0d8c826f /nixos/modules | |
parent | c76f50fec6efb716ca4cb91bcbbefba5a9f3fb4b (diff) | |
parent | eacb020a0c02a86f0fa89d33549a91bedca8ccfa (diff) | |
download | nixlib-f7ad0c0fd5f1fddf8f3290bcb7164302802be42e.tar nixlib-f7ad0c0fd5f1fddf8f3290bcb7164302802be42e.tar.gz nixlib-f7ad0c0fd5f1fddf8f3290bcb7164302802be42e.tar.bz2 nixlib-f7ad0c0fd5f1fddf8f3290bcb7164302802be42e.tar.lz nixlib-f7ad0c0fd5f1fddf8f3290bcb7164302802be42e.tar.xz nixlib-f7ad0c0fd5f1fddf8f3290bcb7164302802be42e.tar.zst nixlib-f7ad0c0fd5f1fddf8f3290bcb7164302802be42e.zip |
Merge pull request #19675 from edwtjo/dictd-touchup
Dictd touchup
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/services/misc/dictd.nix | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/nixos/modules/services/misc/dictd.nix b/nixos/modules/services/misc/dictd.nix index ef744439c3d6..24dca15dd913 100644 --- a/nixos/modules/services/misc/dictd.nix +++ b/nixos/modules/services/misc/dictd.nix @@ -2,6 +2,10 @@ with lib; +let + cfg = config.services.dictd; +in + { ###### interface @@ -20,7 +24,7 @@ with lib; DBs = mkOption { type = types.listOf types.package; - default = []; + default = with pkgs.dictdDBs; [ wiktionary wordnet ]; example = [ pkgs.dictdDBs.nld2eng ]; description = ''List of databases to make available.''; }; @@ -34,8 +38,8 @@ with lib; config = let dictdb = pkgs.dictDBCollector { dictlist = map (x: { name = x.name; - filename = x; } ) config.services.dictd.DBs; }; - in mkIf config.services.dictd.enable { + filename = x; } ) cfg.DBs; }; + in mkIf cfg.enable { # get the command line client on system path to make some use of the service environment.systemPackages = [ pkgs.dict ]; |