From 00df6a0d065afaf6ead86737aff7103d8c14de6d Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 24 Nov 2019 19:00:09 +0100 Subject: ... --- custom/btrfs-snapshots.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'custom/btrfs-snapshots.nix') diff --git a/custom/btrfs-snapshots.nix b/custom/btrfs-snapshots.nix index 6cc89da9..96d2b2ba 100644 --- a/custom/btrfs-snapshots.nix +++ b/custom/btrfs-snapshots.nix @@ -41,10 +41,10 @@ in { serviceConfig = with pkgs; { Type = "oneshot"; - ExecStartPre = "-${btrfs-progs}/bin/btrfs subvolume delete -c ${snapshotMount "%i"}"; - ExecStart = "${btrfs-progs}/bin/btrfs subvolume snapshot ${optionalString cfg.readOnly "-r"} %f ${snapshotMount "%i"}"; + ExecStartPre = "-${btrfs-progs}/bin/btrfs subvolume delete -c ${snapshotMount "%f"}"; + ExecStart = "${btrfs-progs}/bin/btrfs subvolume snapshot ${optionalString cfg.readOnly "-r"} %f ${snapshotMount "%f"}"; RemainAfterExit = true; - ExecStop = "${btrfs-progs}/bin/btrfs subvolume delete -c ${snapshotMount "%i"}"; + ExecStop = "${btrfs-progs}/bin/btrfs subvolume delete -c ${snapshotMount "%f"}"; }; }; -- cgit v1.2.3