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