summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--custom/borgbackup.nix2
-rw-r--r--custom/lvm-snapshots.nix2
2 files changed, 2 insertions, 2 deletions
diff --git a/custom/borgbackup.nix b/custom/borgbackup.nix
index e65fad2e..ed1976fc 100644
--- a/custom/borgbackup.nix
+++ b/custom/borgbackup.nix
@@ -86,7 +86,7 @@ in {
86 86
87 services.btrfs-snapshots.enable = mkIf (cfg.snapshots == "btrfs") true; 87 services.btrfs-snapshots.enable = mkIf (cfg.snapshots == "btrfs") true;
88 88
89 services.lvm-snapshots.snapshots = mkIf (cfg.snapshots == "lvm") (listToAttrs (map (path: nameValuePair (systemdPath path) { 89 services.lvm-snapshots.snapshots = mkIf (cfg.snapshots == "lvm") (listToAttrs (map (path: nameValuePair (systemdPath path.LV) {
90 inherit (path) LV VG; 90 inherit (path) LV VG;
91 mountName = "snapshot-${systemdPath path}"; 91 mountName = "snapshot-${systemdPath path}";
92 }) (unique (flatten (mapAttrsToList (target: tCfg: tCfg.paths) cfg.targets))))); 92 }) (unique (flatten (mapAttrsToList (target: tCfg: tCfg.paths) cfg.targets)))));
diff --git a/custom/lvm-snapshots.nix b/custom/lvm-snapshots.nix
index ea69e1ff..7148934f 100644
--- a/custom/lvm-snapshots.nix
+++ b/custom/lvm-snapshots.nix
@@ -65,7 +65,7 @@ in {
65 mkdir -p ${snapshotMount name} 65 mkdir -p ${snapshotMount name}
66 '') cfg.snapshots; 66 '') cfg.snapshots;
67 67
68 systemd.services = mapAttrs' (name: scfg: nameValuePair ("lvm-snapshot@" + snapshotName name) { 68 systemd.services = mapAttrs' (name: scfg: nameValuePair ("lvm-snapshot@" + scfg.VG + "-" + snapshotName name) {
69 enable = true; 69 enable = true;
70 70
71 description = "LVM-snapshot of ${scfg.VG}/${scfg.LV}"; 71 description = "LVM-snapshot of ${scfg.VG}/${scfg.LV}";