mirror of
https://gitlab.com/simple-nixos-mailserver/nixos-mailserver.git
synced 2025-03-31 07:59:52 +05:00
Set HOME to private /tmp for borgbackup
borg writes to $HOME/.config but in our case it also works on $HOME (/var/vmail). This could cause the following error when running the backup: file changed while we backed it up This commit fixes it by setting HOME to private /tmp for borg.
This commit is contained in:
parent
dc0569066e
commit
3e4908fa0f
@ -65,12 +65,16 @@ in {
|
||||
description = "borgbackup";
|
||||
unitConfig.Documentation = "man:borgbackup";
|
||||
script = borgScript;
|
||||
# borg writes to $HOME/.config but in our case it also works on $HOME (/var/vmail)
|
||||
# Setting $HOME to /tmp to avoid it
|
||||
environment.HOME = "/tmp";
|
||||
serviceConfig = {
|
||||
User = cfg.user;
|
||||
Group = cfg.group;
|
||||
CPUSchedulingPolicy = "idle";
|
||||
IOSchedulingClass = "idle";
|
||||
ProtectSystem = "full";
|
||||
PrivateTmp = true;
|
||||
};
|
||||
startAt = cfg.startAt;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user