From 0e661856bf5ca2595771c988e2af1855e4b7add8 Mon Sep 17 00:00:00 2001 From: Hendrik Sokolowski Date: Sun, 27 Nov 2022 23:35:12 +0100 Subject: [PATCH] Fix shutdown units --- hosts/droppie/restic-backup.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hosts/droppie/restic-backup.nix b/hosts/droppie/restic-backup.nix index d3732c21..17619496 100644 --- a/hosts/droppie/restic-backup.nix +++ b/hosts/droppie/restic-backup.nix @@ -37,7 +37,8 @@ in systemd.services."shutdown-after-backup" = { enable = true; serviceConfig = { - ExecStart = shutdownScript; + ExecStart = "${pkgs.bash}/bin/bash ${shutdownScript}"; + Type = "oneshot"; }; }; @@ -47,5 +48,6 @@ in OnCalendar = "3..9:*"; }; wantedBy = [ "timers.target" ]; + partOf = [ "shutdown-after-backup.service" ]; }; }