-{ privateFiles }:
{ config, pkgs, resources, name, ... }:
{
- boot.kernelPackages = pkgs.linuxPackages_latest;
- myEnv = import "${privateFiles}/environment.nix" // { inherit privateFiles; };
-
- imports = builtins.attrValues (import ../..);
-
deployment = {
- targetEnv = "hetznerCloud";
- hetznerCloud = {
- authToken = config.myEnv.hetznerCloud.authToken;
- datacenter = "hel1-dc2";
- location ="hel1";
- serverType = "cx11";
- };
+ targetUser = "root";
+ targetHost = config.hostEnv.ips.main.ip4;
+ substituteOnDestination = true;
};
+ # ssh-keyscan backup-2 | nix-shell -p ssh-to-age --run ssh-to-age
+ secrets.ageKeys = [ "age1kk3nr27qu42j28mcfdag5lhq0zu2pky7gfanvne8l4z2ctevjpgskmw0sr" ];
+ boot.kernelPackages = pkgs.linuxPackages_latest;
+ myEnv = import ../../../nixops/secrets/environment.nix;
+
+ imports = [ <nixpkgs/nixos/modules/profiles/qemu-guest.nix> ] ++ builtins.attrValues (import ../..);
fileSystems = {
"/backup2" = {
fsType = "ext4";
device = "UUID=b9425333-f567-435d-94d8-b26c22d93426";
};
+ "/" = { device = "/dev/sda1"; fsType = "ext4"; };
};
networking = {
defaultGateway6 = { address = "fe80::1"; interface = "ens3"; };
};
+ boot.loader.grub.device = "nodev";
+
myServices.certificates.enable = true;
security.acme.certs."${name}" = {
user = config.services.nginx.user;
postgresql = {
enable = true;
base = "/backup2";
+ mainPackage = pkgs.postgresql;
hosts = {
eldiron = {
slot = "backup_2";
connection = "postgresql://backup-2:${config.hostEnv.ldap.password}@eldiron.immae.eu";
+ package = pkgs.postgresql;
};
};
};
# database servers. You should change this only after NixOS release
# notes say you should.
# https://nixos.org/nixos/manual/release-notes.html
- system.stateVersion = "19.03"; # Did you read the comment?
+ system.stateVersion = "20.03"; # Did you read the comment?
}