]> Git — Sourcephile - sourcephile-nix.git/blob - nixos/modules.nix
transmission: improve the service module
[sourcephile-nix.git] / nixos / modules.nix
1 { pkgs, lib, config, ... }:
2 # NOTE: list explicitely the modules loaded by defaults.nix,
3 # its clearer, safer and more flexible if not quicker.
4 {
5 imports = [
6 modules/install/ssh-nixos.nix
7 modules/security/pass.nix
8 modules/services/networking/domains.nix
9 #modules/services/networking/knot.nix
10 modules/services/databases/openldap.nix
11 modules/services/mail/public-inbox.nix
12 #modules/services/mail/mlmmj.nix
13 modules/services/torrent/transmission.nix
14 ];
15 disabledModules = [
16 "services/mail/public-inbox.nix"
17 "services/mail/mlmmj.nix"
18 "services/torrent/transmission.nix"
19 ];
20 }
21
22 /*
23 # NOTE: this modules.nix file is put in the imports of the configuration.nix,
24 # but using the lib.findFiles defined in the nixpkgs.overlays leads to an infinite recursion,
25 # hence it is redefined here:
26 let findFiles = pattern:
27 with builtins;
28 let go = curr:
29 let dir = readDir curr; in
30 let files = lib.filterAttrs (name: type:
31 type == "regular" &&
32 match pattern name != null) dir; in
33 let dirs = lib.filterAttrs (name: type: type == "directory") dir; in
34 map (name: "${curr}/${name}") (attrNames files) ++
35 lib.concatMap (name: go "${curr}/${name}") (attrNames dirs)
36 ;
37 in go ;
38 in
39 {
40 imports = findFiles ".*\\.nix" ./modules;
41 }
42 */