64 lines
2 KiB
Nix
64 lines
2 KiB
Nix
{config, ...}: {
|
|
age.secrets.uwuraid.file = ../secrets/uwuraid.age;
|
|
systemd.mounts = let
|
|
opts = {
|
|
type = "cifs";
|
|
mountConfig = {
|
|
Options = "_netdev,noserverino,nounix,nobrl,noperm,noauto,noatime,async,rw,x-systemd.automount,x-systemd.requires=tailscaled.service,x-systemd.automount-idle-timeout=60,nofail,soft,softrw,credentials=${config.age.secrets.uwuraid.path},file_mode=0777,dir_mode=0777,echo_interval=30,echo_retries=2,closetimeo=0,vers=3.0,iocharset=utf8";
|
|
};
|
|
};
|
|
in [
|
|
(opts
|
|
// {
|
|
what = "//100.97.47.81/backup";
|
|
where = "/mnt/uwuraid/backup";
|
|
})
|
|
(opts
|
|
// {
|
|
what = "//100.97.47.81/everything";
|
|
where = "/mnt/uwuraid/everything";
|
|
})
|
|
(opts
|
|
// {
|
|
what = "//100.97.47.81/downloads";
|
|
where = "/mnt/uwuraid/downloads";
|
|
})
|
|
(opts
|
|
// {
|
|
what = "//100.97.47.81/media";
|
|
where = "/mnt/uwuraid/media";
|
|
})
|
|
# (opts
|
|
# // {
|
|
# what = "//100.97.47.81/isos";
|
|
# where = "/mnt/uwuraid/isos";
|
|
# })
|
|
(opts
|
|
// {
|
|
what = "//100.97.47.81/photos";
|
|
where = "/mnt/uwuraid/photos";
|
|
})
|
|
(opts
|
|
// {
|
|
what = "//100.97.47.81/virginia";
|
|
where = "/mnt/uwuraid/virginia";
|
|
})
|
|
];
|
|
systemd.automounts = let
|
|
opts = {
|
|
wantedBy = ["multi-user.target"];
|
|
automountConfig = {
|
|
TimeoutIdleSec = "60";
|
|
# DirectoryMode
|
|
};
|
|
};
|
|
in [
|
|
(opts // {where = "/mnt/uwuraid/backup";})
|
|
(opts // {where = "/mnt/uwuraid/everything";})
|
|
(opts // {where = "/mnt/uwuraid/downloads";})
|
|
(opts // {where = "/mnt/uwuraid/media";})
|
|
# (opts // {where = "/mnt/uwuraid/isos";})
|
|
(opts // {where = "/mnt/uwuraid/photos";})
|
|
(opts // {where = "/mnt/uwuraid/virginia";})
|
|
];
|
|
}
|