{ pkgs, lib, config, ... }: # NOTE: list explicitely the modules loaded by defaults.nix, # its clearer, safer and more flexible if not quicker. { imports = [ modules/services/networking/domains.nix #modules/services/networking/knot.nix modules/services/databases/openldap.nix modules/services/mail/public-inbox.nix #modules/services/mail/mlmmj.nix ]; disabledModules = [ "services/mail/public-inbox.nix" "services/mail/mlmmj.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; } */