summaryrefslogtreecommitdiff
path: root/custom
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2018-01-02 05:58:17 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2018-01-02 05:58:17 +0100
commit62e21f67f0d139c9926c382630ad0a652aaeedc9 (patch)
tree59a8b992b74e104cd9568b1fe1108e838cfb91f7 /custom
parentb3a5a87eb092c8ee289a96ce81e1cc9def4a4d55 (diff)
downloadnixos-62e21f67f0d139c9926c382630ad0a652aaeedc9.tar
nixos-62e21f67f0d139c9926c382630ad0a652aaeedc9.tar.gz
nixos-62e21f67f0d139c9926c382630ad0a652aaeedc9.tar.bz2
nixos-62e21f67f0d139c9926c382630ad0a652aaeedc9.tar.xz
nixos-62e21f67f0d139c9926c382630ad0a652aaeedc9.zip
Delete subvolume before trying to create
Diffstat (limited to 'custom')
-rw-r--r--custom/btrfs-snapshots.nix1
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"}";