feat(mottarone): add urbackup
This commit is contained in:
parent
6069ebb09d
commit
fd57aa3657
4 changed files with 77 additions and 0 deletions
32
systems/mottarone/urbackup.nix
Normal file
32
systems/mottarone/urbackup.nix
Normal 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
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue