Add escaped path to script

This commit is contained in:
Torjus Håkestad 2024-06-02 23:15:23 +02:00
parent 6089368745
commit af496e418e

View File

@ -1,6 +1,7 @@
{ lib, config, pkgs, utils, ... }: { lib, config, pkgs, utils, ... }:
let let
cfg = config.backup-helper; cfg = config.backup-helper;
escaped-path = utils.escapeSystemdPath "/etc/machine-id";
restic-wrapper = pkgs.writeShellApplication { restic-wrapper = pkgs.writeShellApplication {
name = "restic-wrapper"; name = "restic-wrapper";
runtimeInputs = [ runtimeInputs = [
@ -14,10 +15,9 @@ let
fi fi
path="$1"; path="$1";
echo "Starting backup of $path"; echo "Starting backup of $path";
# restic backup "$path"; # restic backup ${escaped-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";