From 7a2d2e21b36cd9212259f23fb8c3a573984a2daa Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 9 Apr 2018 13:46:28 +0200 Subject: nicer names --- custom/borgbackup.nix | 2 +- custom/lvm-snapshots.nix | 2 +- 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 { services.btrfs-snapshots.enable = mkIf (cfg.snapshots == "btrfs") true; - services.lvm-snapshots.snapshots = mkIf (cfg.snapshots == "lvm") (listToAttrs (map (path: nameValuePair (systemdPath path) { + services.lvm-snapshots.snapshots = mkIf (cfg.snapshots == "lvm") (listToAttrs (map (path: nameValuePair (systemdPath path.LV) { inherit (path) LV VG; mountName = "snapshot-${systemdPath path}"; }) (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 { mkdir -p ${snapshotMount name} '') cfg.snapshots; - systemd.services = mapAttrs' (name: scfg: nameValuePair ("lvm-snapshot@" + snapshotName name) { + systemd.services = mapAttrs' (name: scfg: nameValuePair ("lvm-snapshot@" + scfg.VG + "-" + snapshotName name) { enable = true; description = "LVM-snapshot of ${scfg.VG}/${scfg.LV}"; -- cgit v1.2.3