]> Git — Sourcephile - sourcephile-nix.git/blob - servers/mermet/configuration.nix
nix: fix nixpkgs-overlays=
[sourcephile-nix.git] / servers / mermet / configuration.nix
1 # This is the root configuration of the target machine.
2 # Usable by nixos-install and used by nixops.
3 # It is NOT copied nor usable on the target machine,
4 # only the resulting closure is copied to the target machine.
5 { pkgs, lib, config, options, ... }@attrs:
6 let
7 inherit (builtins) getEnv hasAttr readFile;
8 inherit (builtins.extraBuiltins) pass pass-chomp;
9 in
10 {
11 # This value determines the NixOS release with which your system is to be
12 # compatible, in order to avoid breaking some software such as database servers.
13 # You should change this only after NixOS release notes say you should.
14 system.stateVersion = "19.09"; # Did you read the comment?
15
16 imports = [
17 (./. + ("/" + getEnv "MERMET_DEPLOYMENT" + ".nix"))
18 ../../defaults.nix
19 ../../base/unbound.nix
20 ./users.nix
21 #./nsd.nix
22 ./knot.nix
23 ./openldap.nix
24 ./gitolite.nix
25 ./nginx.nix
26 ./postfix.nix
27 ./dovecot.nix
28 ./redis.nix
29 ./rspamd.nix
30 ] ++ lib.optional (hasAttr "nodes" attrs)
31 (pkgs.nixops + "/share/nix/nixops/options.nix");
32
33 networking = rec {
34 hostName = "mermet";
35 domainBase = "sourcephile";
36 domain = "${domainBase}.fr";
37 };
38
39 /*
40 environment.etc."sudo.conf".text = ''
41 Debug sudo /var/log/sudo_debug.log all@debug
42 Debug sudoers.so /var/log/sudo_debug.log all@debug
43 '';
44 */
45
46 systemd.coredump.enable = true;
47
48 environment = {
49 enableDebugInfo = true;
50 systemPackages = with pkgs; [
51 cryptsetup
52 direnv
53 file
54 fio
55 gdb
56 git
57 gptfdisk
58 #hey
59 home-manager
60 lm_sensors
61 rsync
62 smartctl-tbw
63 socat
64 thttpd
65 ];
66 };
67 }