-{ config, pkgs, myconfig, resources, ... }:
+{ config, pkgs, resources, ... }:
- _module.args.privateFiles = privateFiles;
- _module.args.hostFQDN = "backup-2.v.immae.eu";
+ myEnv = import "${privateFiles}/environment.nix" // { inherit privateFiles; };
+ hostEnv.FQDN = "backup-2.v.immae.eu";
+
firewall.enable = true;
interfaces."ens3".ipv4.addresses = pkgs.lib.attrsets.mapAttrsToList
(n: ips: { address = ips.ip4; prefixLength = 32; })
firewall.enable = true;
interfaces."ens3".ipv4.addresses = pkgs.lib.attrsets.mapAttrsToList
(n: ips: { address = ips.ip4; prefixLength = 32; })
interfaces."ens3".ipv6.addresses = pkgs.lib.flatten (pkgs.lib.attrsets.mapAttrsToList
(n: ips: map (ip: { address = ip; prefixLength = (if n == "main" && ip == pkgs.lib.head ips.ip6 then 64 else 128); }) (ips.ip6 or []))
interfaces."ens3".ipv6.addresses = pkgs.lib.flatten (pkgs.lib.attrsets.mapAttrsToList
(n: ips: map (ip: { address = ip; prefixLength = (if n == "main" && ip == pkgs.lib.head ips.ip6 then 64 else 128); }) (ips.ip6 or []))
- mailto = myconfig.env.rsync_backup.mailto;
- profiles = myconfig.env.rsync_backup.profiles;
- ssh_key_public = myconfig.env.rsync_backup.ssh_key.public;
- ssh_key_private = myconfig.env.rsync_backup.ssh_key.private;
+ mailto = config.myEnv.rsync_backup.mailto;
+ profiles = config.myEnv.rsync_backup.profiles;
+ ssh_key_public = config.myEnv.rsync_backup.ssh_key.public;
+ ssh_key_private = config.myEnv.rsync_backup.ssh_key.private;
- url = "ldaps://${myconfig.env.ldap.host}:636";
- dn = myconfig.env.ldap.replication_dn;
- password = myconfig.env.ldap.replication_pw;
- base = myconfig.env.ldap.base;
+ url = "ldaps://${config.myEnv.ldap.host}:636";
+ dn = config.myEnv.ldap.replication_dn;
+ password = config.myEnv.ldap.replication_pw;
+ base = config.myEnv.ldap.base;