]> Git — Sourcephile - sourcephile-nix.git/blob - servers/losurdo/production.nix
nix: replace nixops by shell scripts
[sourcephile-nix.git] / servers / losurdo / production.nix
1 # This is the configuration.nix
2 # of the target machine in production.
3 # Used by NixOps.
4 # It is NOT copied nor usable on the target machine,
5 # only the resulting closure is copied to the target machine.
6 { pkgs, lib, config, ... }:
7 let
8 inherit (builtins.extraBuiltins) pass;
9 #inherit (config) networking;
10 mapImportedConfigRecursively = mapConfig:
11 map (m: modArgs:
12 let mod =
13 if builtins.isFunction m
14 || builtins.isAttrs m
15 then lib.unifyModuleSyntax null null
16 (lib.applyIfFunction null m modArgs)
17 else lib.unifyModuleSyntax (toString m) (toString m)
18 (lib.applyIfFunction (toString m) (import m) modArgs);
19 in
20 mod // {
21 imports = mapImportedConfigRecursively mapConfig mod.imports;
22 config = mapConfig mod.config;
23 }
24 );
25 in
26 {
27 imports = [
28 ../../base/unbound.nix
29 ../../defaults.nix
30 ./debug.nix
31 ./fileSystems.nix
32 ./hardware.nix
33 #./netdata.nix
34 ./networking.nix
35 #./prometheus.nix
36 ./sanoid.nix
37 ./shorewall.nix
38 ./syncoid.nix
39 ./system.nix
40 ./transmission.nix
41 ./users.nix
42 ];
43 }