Move automount configuration to datasync module

This commit is contained in:
coolneng 2022-02-21 19:05:18 +01:00
parent 1dce59a7cd
commit a71155007c
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
2 changed files with 29 additions and 30 deletions

View File

@ -83,6 +83,35 @@
automount_opts =
"x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s";
credentials = config.age.secrets.samba-ugent.path;
# Automount external storage
systemd.mounts = [
# USB
{
what = "/dev/sda1";
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" ];
}
];
in [
"${automount_opts},credentials=${credentials},noperm,vers=3.0,sec=ntlmv2i"

View File

@ -85,36 +85,6 @@ with pkgs;
baseIndex = 1;
};
# Automount external storage
systemd.mounts = [
# USB
{
what = "/dev/sda1";
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;