summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2018-04-09 13:46:28 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2018-04-09 13:46:28 +0200
commit7a2d2e21b36cd9212259f23fb8c3a573984a2daa (patch)
tree234a4192e6ecd9fd235881952d571cde66962ad8
parent3625eeb2f0670c1e5c75edf11e9774d4b2337359 (diff)
downloadnixos-7a2d2e21b36cd9212259f23fb8c3a573984a2daa.tar
nixos-7a2d2e21b36cd9212259f23fb8c3a573984a2daa.tar.gz
nixos-7a2d2e21b36cd9212259f23fb8c3a573984a2daa.tar.bz2
nixos-7a2d2e21b36cd9212259f23fb8c3a573984a2daa.tar.xz
nixos-7a2d2e21b36cd9212259f23fb8c3a573984a2daa.zip
nicer names
-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}";