mirror of
https://gitlab.com/simple-nixos-mailserver/nixos-mailserver.git
synced 2025-04-02 05:44:33 +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";
|
description = "borgbackup";
|
||||||
unitConfig.Documentation = "man:borgbackup";
|
unitConfig.Documentation = "man:borgbackup";
|
||||||
script = borgScript;
|
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 = {
|
serviceConfig = {
|
||||||
User = cfg.user;
|
User = cfg.user;
|
||||||
Group = cfg.group;
|
Group = cfg.group;
|
||||||
CPUSchedulingPolicy = "idle";
|
CPUSchedulingPolicy = "idle";
|
||||||
IOSchedulingClass = "idle";
|
IOSchedulingClass = "idle";
|
||||||
ProtectSystem = "full";
|
ProtectSystem = "full";
|
||||||
|
PrivateTmp = true;
|
||||||
};
|
};
|
||||||
startAt = cfg.startAt;
|
startAt = cfg.startAt;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user