From 6089368745606bf1f54172cb30d3a013c38577e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Sun, 2 Jun 2024 23:12:25 +0200 Subject: [PATCH] use utils.escapeSystemdPath --- backup.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backup.nix b/backup.nix index 641f0f6..6385ec4 100644 --- a/backup.nix +++ b/backup.nix @@ -1,4 +1,4 @@ -{ lib, config, pkgs, ... }: +{ lib, config, pkgs, utils, ... }: let cfg = config.backup-helper; restic-wrapper = pkgs.writeShellApplication { @@ -17,6 +17,7 @@ let # restic backup "$path"; ''; }; + escaped-path = utils.escapeSystemdPath "/etc/machine-id"; in { options.backup-helper.enable = lib.mkEnableOption "Enable backup-helper"; @@ -67,7 +68,7 @@ in RandomizedDelaySec = cfg.randomized-delay; }; }; - systemd.timers."backup-helper@/etc/machine-id" = { + systemd.timers.${escaped-path} = { wantedBy = [ "timers.target" ]; overrideStrategy = "asDropin"; };