Fix warning in unit file
This commit is contained in:
parent
c90d8e481c
commit
b83c23b801
15
backup.nix
15
backup.nix
@ -1,4 +1,9 @@
|
||||
{ lib, config, pkgs, utils, ... }:
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.backup-helper;
|
||||
restic-wrapper = pkgs.writeShellApplication {
|
||||
@ -58,11 +63,14 @@ in
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
systemd.services."backup-helper" = {
|
||||
wants = [ "network-online.target" ];
|
||||
after = [ "network-online.target" ];
|
||||
environment = {
|
||||
environment =
|
||||
{
|
||||
RESTIC_REPOSITORY = cfg.restic-repository;
|
||||
BACKUP_HELPER_DIRS = lib.strings.concatStringsSep "," cfg.backup-dirs;
|
||||
} // lib.attrsets.optionalAttrs (builtins.hasAttr "password-file" cfg) {
|
||||
}
|
||||
// lib.attrsets.optionalAttrs (builtins.hasAttr "password-file" cfg) {
|
||||
RESTIC_PASSWORD_FILE = cfg.password-file;
|
||||
};
|
||||
serviceConfig = {
|
||||
@ -80,4 +88,3 @@ in
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user