fruitbasket/modules/bacula.nix

39 lines
1.2 KiB
Nix
Raw Normal View History

2023-07-19 15:46:49 +02:00
{ config, ... }:
{
sops.secrets = {
"bacula/password".owner = "bacula";
"bacula/keypair".owner = "bacula";
"bacula/masterkey".owner = "bacula";
};
2023-07-19 16:02:41 +02:00
networking.firewall.allowedTCPPorts = [ config.services.bacula-fd.port ];
networking.firewall.allowedUDPPorts = [ config.services.bacula-fd.port ];
2023-07-19 15:46:49 +02:00
services.bacula-fd = {
enable = true;
name = "ifsr-quitte";
extraClientConfig = ''
Maximum Concurrent Jobs = 20
FDAddress = 141.30.30.169
PKI Signatures = Yes
PKI Encryption = Yes
PKI Keypair = ${config.sops.secrets."bacula/keypair".path}
PKI Master Key = ${config.sops.secrets."bacula/masterkey".path}
'';
extraMessagesConfig = ''
2023-07-19 15:56:07 +02:00
director = abel-dir = all, !skipped, !restored
2023-07-19 15:46:49 +02:00
'';
director."abel-dir".password = "@${config.sops.secrets."bacula/password".path}";
};
environment.etc."bacula/bconsole.conf".text = ''
Director {
Name = abel-dir
DIRport = 9101
address = 10.144.0.11
2023-07-19 15:56:07 +02:00
Password = @${config.sops.secrets."bacula/password".path}
2023-07-19 15:46:49 +02:00
}
Console {
Name = ifsr-quitte-console
2023-07-19 15:56:07 +02:00
Password = @${config.sops.secrets."bacula/password".path}
2023-07-19 15:46:49 +02:00
}
'';
}