borgbackup: use package from upstream NixOS service
This commit is contained in:
@@ -16,7 +16,6 @@
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
@@ -67,15 +66,15 @@ let
|
||||
borgScript = ''
|
||||
export BORG_REPO=${repoLocation}
|
||||
${cmdPreexec}
|
||||
${passphraseFragment} ${pkgs.borgbackup}/bin/borg init ${extraInitArgs} --encryption ${encryptionFragment} || true
|
||||
${passphraseFragment} ${pkgs.borgbackup}/bin/borg create ${extraCreateArgs} ${compression} ::${name} ${locations}
|
||||
${passphraseFragment} ${lib.getExe' config.services.borgbackup.package "borg"} init ${extraInitArgs} --encryption ${encryptionFragment} || true
|
||||
${passphraseFragment} ${lib.getExe' config.services.borgbackup.package "borg"} create ${extraCreateArgs} ${compression} ::${name} ${locations}
|
||||
${cmdPostexec}
|
||||
'';
|
||||
in
|
||||
{
|
||||
config = lib.mkIf (config.mailserver.enable && cfg.enable) {
|
||||
environment.systemPackages = with pkgs; [
|
||||
borgbackup
|
||||
environment.systemPackages = [
|
||||
config.services.borgbackup.package
|
||||
];
|
||||
|
||||
systemd.services.borgbackup = {
|
||||
|
||||
Reference in New Issue
Block a user