diff options
-rw-r--r-- | custom/btrfs-snapshots.nix | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/custom/btrfs-snapshots.nix b/custom/btrfs-snapshots.nix index 7114e9d9..44b08740 100644 --- a/custom/btrfs-snapshots.nix +++ b/custom/btrfs-snapshots.nix | |||
@@ -50,6 +50,7 @@ in { | |||
50 | 50 | ||
51 | serviceConfig = with pkgs; { | 51 | serviceConfig = with pkgs; { |
52 | Type = "oneshot"; | 52 | Type = "oneshot"; |
53 | ExecStartPre = "-${btrfs-progs}/bin/btrfs subvolume delete -c ${snapshotMount "%i"}"; | ||
53 | ExecStart = "${btrfs-progs}/bin/btrfs subvolume snapshot ${optionalString cfg.readOnly "-r"} %f ${snapshotMount "%i"}"; | 54 | ExecStart = "${btrfs-progs}/bin/btrfs subvolume snapshot ${optionalString cfg.readOnly "-r"} %f ${snapshotMount "%i"}"; |
54 | RemainAfterExit = true; | 55 | RemainAfterExit = true; |
55 | ExecStop = "${btrfs-progs}/bin/btrfs subvolume delete -c ${snapshotMount "%i"}"; | 56 | ExecStop = "${btrfs-progs}/bin/btrfs subvolume delete -c ${snapshotMount "%i"}"; |