fix(borg): fix build failure when no borg configs
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
25ab7c3b2d
commit
1470111ab2
1 changed files with 3 additions and 2 deletions
|
@ -4,7 +4,7 @@
|
|||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) filterAttrs mapAttrs mkDefault mkOption types;
|
||||
inherit (lib) filterAttrs mapAttrs mkDefault mkIf mkOption types;
|
||||
|
||||
cfg = config.services.borgbackup;
|
||||
secrets = config.sops.secrets;
|
||||
|
@ -16,6 +16,7 @@ in {
|
|||
};
|
||||
configs = mkOption {
|
||||
type = types.attrs;
|
||||
default = {};
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -25,7 +26,7 @@ in {
|
|||
pve.publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG/4mrp8E4Ittwg8feRmPtDHSDR2+Pq4uZHeF5MweVcW";
|
||||
};
|
||||
|
||||
services.borgbackup = {
|
||||
services.borgbackup = mkIf (cfg.configs != {}) {
|
||||
defaults = {
|
||||
environment = mkDefault {BORG_RSH = "ssh -i ${secrets.borg-ssh.path}";};
|
||||
|
||||
|
|
Loading…
Reference in a new issue