diff options
| author | Gregor Kleen <gkleen@yggdrasil.li> | 2017-12-17 00:40:53 +0100 |
|---|---|---|
| committer | Gregor Kleen <gkleen@yggdrasil.li> | 2017-12-17 00:40:53 +0100 |
| commit | cfc835ef40bc78235fe4719a8389a7ce8a7d1882 (patch) | |
| tree | 921239f25f132a4b424a7d37bf64e750fe92282e /custom | |
| parent | 8636e033d3390e2a754c76ca645a687f7e89548e (diff) | |
| download | nixos-cfc835ef40bc78235fe4719a8389a7ce8a7d1882.tar nixos-cfc835ef40bc78235fe4719a8389a7ce8a7d1882.tar.gz nixos-cfc835ef40bc78235fe4719a8389a7ce8a7d1882.tar.bz2 nixos-cfc835ef40bc78235fe4719a8389a7ce8a7d1882.tar.xz nixos-cfc835ef40bc78235fe4719a8389a7ce8a7d1882.zip | |
…
Diffstat (limited to 'custom')
| -rw-r--r-- | custom/btrfs-snapshots.nix | 9 |
1 files changed, 7 insertions, 2 deletions
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 { | |||
| 10 | options = { | 10 | options = { |
| 11 | 11 | ||
| 12 | services.btrfs-snapshots = { | 12 | services.btrfs-snapshots = { |
| 13 | enable = mkEnableOption "btrfs snapshot unit"; | 13 | enable = mkEnableOption "a systemd unit for btrfs snapshots"; |
| 14 | 14 | ||
| 15 | mountPoint = mkOption { | 15 | mountPoint = mkOption { |
| 16 | type = types.path; | 16 | type = types.path; |
| @@ -26,6 +26,11 @@ in { | |||
| 26 | type = types.bool; | 26 | type = types.bool; |
| 27 | default = true; | 27 | default = true; |
| 28 | }; | 28 | }; |
| 29 | |||
| 30 | persist = mkOption { | ||
| 31 | type = types.bool; | ||
| 32 | default = false; | ||
| 33 | }; | ||
| 29 | }; | 34 | }; |
| 30 | 35 | ||
| 31 | }; | 36 | }; |
| @@ -38,7 +43,7 @@ in { | |||
| 38 | 43 | ||
| 39 | unitConfig = { | 44 | unitConfig = { |
| 40 | AssertPathIsDirectory = cfg.mountPoint; | 45 | AssertPathIsDirectory = cfg.mountPoint; |
| 41 | StopWhenUnneeded = true; | 46 | StopWhenUnneeded = !persist; |
| 42 | }; | 47 | }; |
| 43 | 48 | ||
| 44 | serviceConfig = with pkgs; { | 49 | serviceConfig = with pkgs; { |
