diff --git a/modules/gui.nix b/modules/gui.nix index fafd37a..d9f6752 100644 --- a/modules/gui.nix +++ b/modules/gui.nix @@ -88,18 +88,34 @@ in { }; # Automount external storage - services.autofs = { - enable = true; - timeout = 5; - autoMaster = let - mapConf = pkgs.writeText "auto" '' - usb -fstype=auto :/dev/sdb1 - sdcard -fstype=auto :/dev/mmcblk0p1 - ''; - in '' - /media file:${mapConf} --timeout=5 - ''; - }; + systemd.mounts = [ + # USB + { + what = "/dev/sdb1"; + where = "/usb"; + mountConfig = { TimeoutSec = "5"; }; + } + # SD card + { + what = "/dev/mmcblk0p1"; + where = "/sdcard"; + mountConfig = { TimeoutSec = "5"; }; + } + ]; + systemd.automounts = [ + # USB + { + where = "/usb"; + automountConfig = { TimeoutIdleSec = "5"; }; + wantedBy = [ "default.target" ]; + } + # SD card + { + where = "/sdcard"; + automountConfig = { TimeoutIdleSec = "5"; }; + wantedBy = [ "default.target" ]; + } + ]; # Integrate pass with the browser programs.browserpass.enable = true;