2 { config, pkgs, myconfig, resources, ... }:
4 boot.kernelPackages = pkgs.linuxPackages_latest;
5 _module.args.privateFiles = privateFiles;
6 imports = builtins.attrValues (import ../..);
9 targetEnv = "hetznerCloud";
11 authToken = myconfig.env.hetznerCloud.authToken;
12 datacenter = "hel1-dc2";
21 device = "UUID=b9425333-f567-435d-94d8-b26c22d93426";
26 firewall.enable = true;
27 interfaces."ens3".ipv4.addresses = pkgs.lib.attrsets.mapAttrsToList
28 (n: ips: { address = ips.ip4; prefixLength = 32; })
29 (pkgs.lib.attrsets.filterAttrs (n: v: n != "main") myconfig.env.servers.backup-2.ips);
30 interfaces."ens3".ipv6.addresses = pkgs.lib.flatten (pkgs.lib.attrsets.mapAttrsToList
31 (n: ips: map (ip: { address = ip; prefixLength = (if n == "main" && ip == pkgs.lib.head ips.ip6 then 64 else 128); }) (ips.ip6 or []))
32 myconfig.env.servers.backup-2.ips);
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?