Skip to content

Commit

Permalink
borgmatic: Do not inhibit idle in service (nix-community#3637)
Browse files Browse the repository at this point in the history
This reflects a systemd service sample file change made in borgmatic
1.7.6, commit 2e9f70d49647d47fb4ca05f428c592b0e4319544:

    When backing up a machine with a monitor using logind to control
    idle timeout and things like DPMS, borgmatic can block the screen
    from turning on/off with systemd-inhibit. This is because by
    default systemd-inhibit will block
    "idle:sleep:shutdown". Borgmatic does not need to care about idle,
    only about suspend and shutdown. So, add an explicit `--what` flag
    for what borgmatic should inhibit.

    For more information see systemd-inhibit(1).
  • Loading branch information
DamienCassou authored and spacekookie committed Feb 10, 2023
1 parent 584d231 commit 35c2d43
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions modules/services/borgmatic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ in {
ExecStart = ''
${pkgs.systemd}/bin/systemd-inhibit \
--who="borgmatic" \
--what="sleep:shutdown" \
--why="Prevent interrupting scheduled backup" \
${programConfig.package}/bin/borgmatic \
--stats \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
CPUSchedulingPolicy=batch
ExecStart=/nix/store/00000000000000000000000000000000-systemd/bin/systemd-inhibit \
--who="borgmatic" \
--what="sleep:shutdown" \
--why="Prevent interrupting scheduled backup" \
@borgmatic@/bin/borgmatic \
--stats \
Expand Down

0 comments on commit 35c2d43

Please sign in to comment.