]> Git — Sourcephile - sourcephile-nix.git/blob - nixos/modules.nix
postfix: no longer use networking.domain
[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/services/mail/dovecot.nix
7 modules/services/networking/domains.nix
8 modules/services/databases/openldap.nix
9 ];
10 }
11
12 /*
13 # NOTE: this modules.nix file is put in the imports of the configuration.nix,
14 # but using the lib.findFiles defined in the nixpkgs.overlays leads to an infinite recursion,
15 # hence it is redefined here:
16 let findFiles = pattern:
17 with builtins;
18 let go = curr:
19 let dir = readDir curr; in
20 let files = lib.filterAttrs (name: type:
21 type == "regular" &&
22 match pattern name != null) dir; in
23 let dirs = lib.filterAttrs (name: type: type == "directory") dir; in
24 map (name: "${curr}/${name}") (attrNames files) ++
25 lib.concatMap (name: go "${curr}/${name}") (attrNames dirs)
26 ;
27 in go ;
28 in
29 {
30 imports = findFiles ".*\\.nix" ./modules;
31 }
32 */