diff options
Diffstat (limited to 'custom')
| -rw-r--r-- | custom/lvm-snapshots.nix | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/custom/lvm-snapshots.nix b/custom/lvm-snapshots.nix index 45282d28..ba15a7db 100644 --- a/custom/lvm-snapshots.nix +++ b/custom/lvm-snapshots.nix | |||
| @@ -70,10 +70,11 @@ in { | |||
| 70 | 70 | ||
| 71 | description = "LVM-snapshot of ${scfg.VG}/${scfg.LV}"; | 71 | description = "LVM-snapshot of ${scfg.VG}/${scfg.LV}"; |
| 72 | 72 | ||
| 73 | requiredBy = ["${escapeSystemdPath "/dev/${scfg.VG}/${snapshotName name}"}.device"]; | ||
| 74 | |||
| 73 | unitConfig = { | 75 | unitConfig = { |
| 74 | StopWhenUnneeded = !scfg.persist; | 76 | StopWhenUnneeded = !scfg.persist; |
| 75 | AssertPathIsDirectory = "/var/lock"; | 77 | AssertPathIsDirectory = "/var/lock"; |
| 76 | RequiredBy = "${escapeSystemdPath "/dev/${scfg.VG}/${snapshotName name}"}.device"; | ||
| 77 | }; | 78 | }; |
| 78 | 79 | ||
| 79 | path = with pkgs; [ devicemapper utillinux ]; | 80 | path = with pkgs; [ devicemapper utillinux ]; |
| @@ -117,9 +118,11 @@ in { | |||
| 117 | systemd.automounts = mapAttrsToList (name: scfg: { | 118 | systemd.automounts = mapAttrsToList (name: scfg: { |
| 118 | enable = true; | 119 | enable = true; |
| 119 | 120 | ||
| 121 | wantedBy = [ "default.target" ]; | ||
| 122 | |||
| 120 | automountConfig = { | 123 | automountConfig = { |
| 121 | TimeoutIdleSec = "5"; | 124 | TimeoutIdleSec = "5"; |
| 122 | DirectoryMode = "0700"; | 125 | DirectoryMode = "0700"q; |
| 123 | }; | 126 | }; |
| 124 | 127 | ||
| 125 | where = snapshotMount name; | 128 | where = snapshotMount name; |
