summaryrefslogtreecommitdiff
path: root/custom/lvm-snapshots.nix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2019-11-24 18:50:14 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2019-11-24 18:50:14 +0100
commit0d8c62f7b347966ca545dd77528a31780b94f792 (patch)
treeadc683c4e6633c44f3b232882944e512c8245fe8 /custom/lvm-snapshots.nix
parent395612ec610b5f66fd9264df81bc5fba9ff72dd1 (diff)
downloadnixos-0d8c62f7b347966ca545dd77528a31780b94f792.tar
nixos-0d8c62f7b347966ca545dd77528a31780b94f792.tar.gz
nixos-0d8c62f7b347966ca545dd77528a31780b94f792.tar.bz2
nixos-0d8c62f7b347966ca545dd77528a31780b94f792.tar.xz
nixos-0d8c62f7b347966ca545dd77528a31780b94f792.zip
refactor borgbackup
Diffstat (limited to 'custom/lvm-snapshots.nix')
-rw-r--r--custom/lvm-snapshots.nix7
1 files changed, 6 insertions, 1 deletions
diff --git a/custom/lvm-snapshots.nix b/custom/lvm-snapshots.nix
index 98c64330..13cbf421 100644
--- a/custom/lvm-snapshots.nix
+++ b/custom/lvm-snapshots.nix
@@ -7,7 +7,7 @@ let
7 cfg = config.services.lvm-snapshots; 7 cfg = config.services.lvm-snapshots;
8 8
9 snapshotMount = name: "${cfg.mountPoint}/${if isNull cfg.snapshots."${name}".mountName then name else cfg.snapshots."${name}".mountName}"; 9 snapshotMount = name: "${cfg.mountPoint}/${if isNull cfg.snapshots."${name}".mountName then name else cfg.snapshots."${name}".mountName}";
10 snapshotName = name: "${name}-snapshot"; 10 snapshotName = name: "${name}-${cfg.mountSuffix}";
11 11
12 snapshotConfig = { 12 snapshotConfig = {
13 options = { 13 options = {
@@ -53,6 +53,11 @@ in {
53 type = types.path; 53 type = types.path;
54 default = "/mnt"; 54 default = "/mnt";
55 }; 55 };
56
57 mountSuffix = mkOption {
58 type = types.str;
59 default = "-snapshot";
60 };
56 }; 61 };
57 }; 62 };
58 63