From c91562f3acb0a5321fb771a30f605d3957c373a9 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 9 Apr 2018 15:56:21 +0200 Subject: automount? --- custom/lvm-snapshots.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/custom/lvm-snapshots.nix b/custom/lvm-snapshots.nix index a144f06a..45282d28 100644 --- a/custom/lvm-snapshots.nix +++ b/custom/lvm-snapshots.nix @@ -113,5 +113,16 @@ in { where = snapshotMount name; what = "/dev/" + scfg.VG + "/" + snapshotName name; }) cfg.snapshots; + + systemd.automounts = mapAttrsToList (name: scfg: { + enable = true; + + automountConfig = { + TimeoutIdleSec = "5"; + DirectoryMode = "0700"; + }; + + where = snapshotMount name; + }) cfg.snapshots; }; } -- cgit v1.2.3