summaryrefslogtreecommitdiff
path: root/custom/btrfs-snapshots.nix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2019-11-24 19:00:09 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2019-11-24 19:00:09 +0100
commit00df6a0d065afaf6ead86737aff7103d8c14de6d (patch)
tree393bac37dade6c7275bab741b601e8d38d912a46 /custom/btrfs-snapshots.nix
parent6e36dda31362181007a21fcee8a61c9b7e163af0 (diff)
downloadnixos-00df6a0d065afaf6ead86737aff7103d8c14de6d.tar
nixos-00df6a0d065afaf6ead86737aff7103d8c14de6d.tar.gz
nixos-00df6a0d065afaf6ead86737aff7103d8c14de6d.tar.bz2
nixos-00df6a0d065afaf6ead86737aff7103d8c14de6d.tar.xz
nixos-00df6a0d065afaf6ead86737aff7103d8c14de6d.zip
...
Diffstat (limited to 'custom/btrfs-snapshots.nix')
-rw-r--r--custom/btrfs-snapshots.nix6
1 files changed, 3 insertions, 3 deletions
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 {
41 41
42 serviceConfig = with pkgs; { 42 serviceConfig = with pkgs; {
43 Type = "oneshot"; 43 Type = "oneshot";
44 ExecStartPre = "-${btrfs-progs}/bin/btrfs subvolume delete -c ${snapshotMount "%i"}"; 44 ExecStartPre = "-${btrfs-progs}/bin/btrfs subvolume delete -c ${snapshotMount "%f"}";
45 ExecStart = "${btrfs-progs}/bin/btrfs subvolume snapshot ${optionalString cfg.readOnly "-r"} %f ${snapshotMount "%i"}"; 45 ExecStart = "${btrfs-progs}/bin/btrfs subvolume snapshot ${optionalString cfg.readOnly "-r"} %f ${snapshotMount "%f"}";
46 RemainAfterExit = true; 46 RemainAfterExit = true;
47 ExecStop = "${btrfs-progs}/bin/btrfs subvolume delete -c ${snapshotMount "%i"}"; 47 ExecStop = "${btrfs-progs}/bin/btrfs subvolume delete -c ${snapshotMount "%f"}";
48 }; 48 };
49 }; 49 };
50 50