use utils.escapeSystemdPath
This commit is contained in:
parent
5b7a98bc54
commit
6089368745
@ -1,4 +1,4 @@
|
|||||||
{ lib, config, pkgs, ... }:
|
{ lib, config, pkgs, utils, ... }:
|
||||||
let
|
let
|
||||||
cfg = config.backup-helper;
|
cfg = config.backup-helper;
|
||||||
restic-wrapper = pkgs.writeShellApplication {
|
restic-wrapper = pkgs.writeShellApplication {
|
||||||
@ -17,6 +17,7 @@ let
|
|||||||
# restic backup "$path";
|
# restic backup "$path";
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
escaped-path = utils.escapeSystemdPath "/etc/machine-id";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.backup-helper.enable = lib.mkEnableOption "Enable backup-helper";
|
options.backup-helper.enable = lib.mkEnableOption "Enable backup-helper";
|
||||||
@ -67,7 +68,7 @@ in
|
|||||||
RandomizedDelaySec = cfg.randomized-delay;
|
RandomizedDelaySec = cfg.randomized-delay;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
systemd.timers."backup-helper@/etc/machine-id" = {
|
systemd.timers.${escaped-path} = {
|
||||||
wantedBy = [ "timers.target" ];
|
wantedBy = [ "timers.target" ];
|
||||||
overrideStrategy = "asDropin";
|
overrideStrategy = "asDropin";
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user