22 lines
495 B
Nix
22 lines
495 B
Nix
{ config
|
|
, lib
|
|
, ...
|
|
}: {
|
|
config = lib.mkMerge (lib.lists.forEach [ "Server_F" "Scans" ] (mount: {
|
|
systemd.mounts = [
|
|
{
|
|
where = "/run/mount/${mount}";
|
|
what = "//192.168.0.1/${mount}";
|
|
type = "cifs";
|
|
options = "vers=3.0,nofail,credentials=${config.age.secrets.oeko-smb.path},uid=1001,gid=100";
|
|
}
|
|
];
|
|
|
|
systemd.automounts = [
|
|
{
|
|
where = "/run/mount/${mount}";
|
|
wantedBy = [ "multi-user.target" ];
|
|
}
|
|
];
|
|
}));
|
|
}
|