2 { config, pkgs, resources, ... }:
4 boot.kernelPackages = pkgs.linuxPackages_latest;
5 myEnv = import "${privateFiles}/environment.nix" // { inherit privateFiles; };
6 hostEnv.FQDN = "monitoring-1.v.immae.eu";
8 imports = builtins.attrValues (import ../..);
11 targetEnv = "hetznerCloud";
13 authToken = config.myEnv.hetznerCloud.authToken;
14 datacenter = "hel1-dc2";
20 myServices.monitoring.enable = true;
21 myServices.monitoring.master = true;
22 myServices.status.enable = true;
24 firewall.enable = true;
25 interfaces."ens3".ipv4.addresses = pkgs.lib.attrsets.mapAttrsToList
26 (n: ips: { address = ips.ip4; prefixLength = 32; })
27 (pkgs.lib.attrsets.filterAttrs (n: v: n != "main") config.myEnv.servers.monitoring-1.ips);
28 interfaces."ens3".ipv6.addresses = pkgs.lib.flatten (pkgs.lib.attrsets.mapAttrsToList
29 (n: ips: map (ip: { address = ip; prefixLength = (if n == "main" && ip == pkgs.lib.head ips.ip6 then 64 else 128); }) (ips.ip6 or []))
30 config.myEnv.servers.monitoring-1.ips);
31 defaultGateway6 = { address = "fe80::1"; interface = "ens3"; };
33 myServices.mailRelay.enable = true;
35 # This value determines the NixOS release with which your system is
36 # to be compatible, in order to avoid breaking some software such as
37 # database servers. You should change this only after NixOS release
38 # notes say you should.
39 # https://nixos.org/nixos/manual/release-notes.html
40 system.stateVersion = "19.03"; # Did you read the comment?