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