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 directDelivery = true;
36 hostName = "eldiron.immae.eu:25";
39 root = "postmaster@immae.eu";
43 services.rsyncBackup = {
44 mountpoint = "/backup2";
45 mailto = myconfig.env.rsync_backup.mailto;
46 profiles = myconfig.env.rsync_backup.profiles;
47 ssh_key_public = myconfig.env.rsync_backup.ssh_key.public;
48 ssh_key_private = myconfig.env.rsync_backup.ssh_key.private;
51 myServices.databasesReplication = {
58 connection = "postgresql://backup-2:${myconfig.env.ldap.backup-2.password}@eldiron.immae.eu";
64 # This value determines the NixOS release with which your system is
65 # to be compatible, in order to avoid breaking some software such as
66 # database servers. You should change this only after NixOS release
67 # notes say you should.
68 # https://nixos.org/nixos/manual/release-notes.html
69 system.stateVersion = "19.03"; # Did you read the comment?