]>
Commit | Line | Data |
---|---|---|
8415083e | 1 | { privateFiles }: |
ae485806 | 2 | { config, pkgs, myconfig, resources, ... }: |
8415083e IB |
3 | { |
4 | boot.kernelPackages = pkgs.linuxPackages_latest; | |
5 | _module.args.privateFiles = privateFiles; | |
6 | imports = builtins.attrValues (import ../..); | |
7 | ||
8 | deployment = { | |
9 | targetEnv = "hetznerCloud"; | |
10 | hetznerCloud = { | |
11 | authToken = myconfig.env.hetznerCloud.authToken; | |
12 | datacenter = "hel1-dc2"; | |
13 | location ="hel1"; | |
14 | serverType = "cx11"; | |
15 | }; | |
16 | }; | |
17 | ||
ae485806 IB |
18 | fileSystems = { |
19 | "/backup2" = { | |
20 | fsType = "ext4"; | |
21 | device = "UUID=b9425333-f567-435d-94d8-b26c22d93426"; | |
22 | }; | |
23 | }; | |
24 | ||
25 | networking = { | |
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); | |
33 | }; | |
34 | ||
8415083e IB |
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? | |
41 | } |