{ pkgs, lib, config, ... }: # NOTE: list explicitely the modules loaded by defaults.nix, # its clearer, safer and more flexible if not quicker. { imports = [ modules/services/mail/dovecot2.nix modules/services/mail/rspamd/dkim.nix modules/services/mail/postfix.nix modules/services/networking/domains.nix modules/services/networking/shorewall.nix modules/services/networking/shorewall6.nix modules/services/networking/shorewall6.nix modules/services/databases/openldap.nix ]; } /* # NOTE: this modules.nix file is put in the imports of the configuration.nix, # but using the lib.findFiles defined in the nixpkgs.overlays leads to an infinite recursion, # hence it is redefined here: let findFiles = pattern: with builtins; let go = curr: let dir = readDir curr; in let files = lib.filterAttrs (name: type: type == "regular" && match pattern name != null) dir; in let dirs = lib.filterAttrs (name: type: type == "directory") dir; in map (name: "${curr}/${name}") (attrNames files) ++ lib.concatMap (name: go "${curr}/${name}") (attrNames dirs) ; in go ; in { imports = findFiles ".*\\.nix" ./modules; } */