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