feat(mottarone): add urbackup

This commit is contained in:
uku 2025-01-29 16:08:06 +01:00
parent 6069ebb09d
commit fd57aa3657
Signed by: uku
SSH key fingerprint: SHA256:4P0aN6M8ajKukNi6aPOaX0LacanGYtlfjmN+m/sHY/o
4 changed files with 77 additions and 0 deletions

View file

@ -0,0 +1,32 @@
{ lib, pkgs, ... }:
{
# requires overlay, see exprs/overlay.nix
environment.systemPackages = [ pkgs.urbackup-client ];
systemd.services."urbackup-client" = {
after = [
"syslog.target"
"network.target"
];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${lib.getExe' pkgs.urbackup-client "urbackupclientbackend"} --config /etc/default/urbackupclient --no-consoletime";
# these paths are hardcoded in the binary, see overlay
StateDirectory = "urbackup urbackup/data";
WorkingDirectory = "/var/lib/urbackup";
};
};
networking.firewall = {
allowedTCPPorts = [
# "Sending files during file backups (file server)"
35621
# "Commands and image backups"
35623
];
allowedUDPPorts = [
# "UDP broadcasts for discovery"
35622
];
};
}