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