self-hosting/profiles/storage.nix

52 lines
1,022 B
Nix
Raw Normal View History

2024-08-26 05:38:10 +02:00
{
config,
pkgs,
pkgs-unstable,
...
}:
{
2021-11-26 00:14:44 +01:00
imports = [
../environment.nix
../hardware/hetzner-dedicated-storage1.nix
../modules
2021-11-26 00:14:44 +01:00
];
2021-12-07 01:55:01 +01:00
2021-12-27 04:03:07 +01:00
sops.secrets = {
2024-08-26 05:38:10 +02:00
nixCacheKey = {
key = "nix/cache_secret_key";
};
};
custom = {
services.binary-cache = {
enable = true;
secretKeyFile = config.sops.secrets.nixCacheKey.path;
};
services.monit = {
enable = true;
additionalConfig = ''
check program raid-md127 with path "${pkgs.mdadm}/bin/mdadm --misc --detail --test /dev/md127"
if status != 0 then alert
'';
};
2024-03-26 23:37:53 +01:00
services.nginx.enable = true;
services.openssh.enable = true;
2021-12-27 04:03:07 +01:00
};
2023-08-08 01:07:19 +02:00
networking.firewall.allowedTCPPorts = [
80
443
2024-12-10 11:39:55 +01:00
];
services.borgbackup.repos = {
epicerie_du_cellier = {
authorizedKeys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJDbiI5UOGpVbaV+xihLqKP0B3UehboMMzOy3HhjjbSz backend1@epicerieducellier.be"
];
path = "/var/lib/epicerie_du_cellier_backup";
};
};
2021-11-26 00:14:44 +01:00
}