Migrate from autofs to systemd automount
This commit is contained in:
parent
a74a6c8aa9
commit
50193e5563
|
@ -88,18 +88,34 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
# Automount external storage
|
# Automount external storage
|
||||||
services.autofs = {
|
systemd.mounts = [
|
||||||
enable = true;
|
# USB
|
||||||
timeout = 5;
|
{
|
||||||
autoMaster = let
|
what = "/dev/sdb1";
|
||||||
mapConf = pkgs.writeText "auto" ''
|
where = "/usb";
|
||||||
usb -fstype=auto :/dev/sdb1
|
mountConfig = { TimeoutSec = "5"; };
|
||||||
sdcard -fstype=auto :/dev/mmcblk0p1
|
}
|
||||||
'';
|
# SD card
|
||||||
in ''
|
{
|
||||||
/media file:${mapConf} --timeout=5
|
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
|
# Integrate pass with the browser
|
||||||
programs.browserpass.enable = true;
|
programs.browserpass.enable = true;
|
||||||
|
|
Loading…
Reference in New Issue