From cfc835ef40bc78235fe4719a8389a7ce8a7d1882 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 17 Dec 2017 00:40:53 +0100 Subject: =?UTF-8?q?=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- custom/btrfs-snapshots.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'custom') diff --git a/custom/btrfs-snapshots.nix b/custom/btrfs-snapshots.nix index 31ff6df9..2722afc3 100644 --- a/custom/btrfs-snapshots.nix +++ b/custom/btrfs-snapshots.nix @@ -10,7 +10,7 @@ in { options = { services.btrfs-snapshots = { - enable = mkEnableOption "btrfs snapshot unit"; + enable = mkEnableOption "a systemd unit for btrfs snapshots"; mountPoint = mkOption { type = types.path; @@ -26,6 +26,11 @@ in { type = types.bool; default = true; }; + + persist = mkOption { + type = types.bool; + default = false; + }; }; }; @@ -38,7 +43,7 @@ in { unitConfig = { AssertPathIsDirectory = cfg.mountPoint; - StopWhenUnneeded = true; + StopWhenUnneeded = !persist; }; serviceConfig = with pkgs; { -- cgit v1.2.3