summaryrefslogtreecommitdiff
path: root/custom
diff options
context:
space:
mode:
Diffstat (limited to 'custom')
-rw-r--r--custom/btrfs-snapshots.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/custom/btrfs-snapshots.nix b/custom/btrfs-snapshots.nix
index 038ec2c4..31ff6df9 100644
--- a/custom/btrfs-snapshots.nix
+++ b/custom/btrfs-snapshots.nix
@@ -35,13 +35,14 @@ in {
35 35
36 systemd.services."btrfs-snapshot@" = { 36 systemd.services."btrfs-snapshot@" = {
37 enable = true; 37 enable = true;
38 path = with pkgs; [btrfs-progs];
39 38
40 unitConfig = { 39 unitConfig = {
41 AssertPathIsDirectory = cfg.mountPoint; 40 AssertPathIsDirectory = cfg.mountPoint;
41 StopWhenUnneeded = true;
42 }; 42 };
43 43
44 serviceConfig = with pkgs; { 44 serviceConfig = with pkgs; {
45 Type = "oneshot";
45 ExecStart = "${btrfs-progs}/bin/btrfs subvolume snapshot ${optionalString cfg.readOnly "-r"} %f ${snapshotMount "%i"}"; 46 ExecStart = "${btrfs-progs}/bin/btrfs subvolume snapshot ${optionalString cfg.readOnly "-r"} %f ${snapshotMount "%i"}";
46 RemainAfterExit = true; 47 RemainAfterExit = true;
47 ExecStop = "${btrfs-progs}/bin/btrfs subvolume delete -c ${snapshotMount "%i"}"; 48 ExecStop = "${btrfs-progs}/bin/btrfs subvolume delete -c ${snapshotMount "%i"}";