New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixos/borgbackup: Add a persistent option #123434
Conversation
This version follows along with how nix-gc allows for these parameters
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please follow our commit naming guide: nixos/borgbackup: Add a persistent option
.
Persistent starts the backup service on power on if it was missed while the system was powered down, for example.
Updated the formatting and the commit name. |
Not sure if we want to act on the following as part of this PR, but will mention this here either way: It seems like this is fixable by adding
to either the timer or service. I think we could automatically detect remote usage by checking for "@" in the string for the repo, and possibly provide a setting to override. |
@@ -98,6 +98,13 @@ let | |||
inherit (cfg) startAt; | |||
}; | |||
|
|||
mkBackupTimers = name: cfg: | |||
nameValuePair "borgbackup-job-${name}" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
adding a description would be nice as well
@mweinelt is setting the default value to |
fixed in #153346 |
Persistent starts the backup service on power on if it was missed while
the system was powered down, for example.
Motivation for this change
Adds an option to make a backup job start on boot if it was missed during power off. This is useful for backups on personal machines where you might have the machine off during the normally scheduled backup.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
) (tested the service to make sure it runs)nix path-info -S
before and after)