hosts/common/samba: reuse options

This commit is contained in:
Aly Raffauf 2024-07-16 17:07:43 -04:00
parent a844e2ff68
commit 444fefdd8e

View file

@ -3,9 +3,7 @@
lib, lib,
... ...
}: { }: {
fileSystems = lib.attrsets.optionalAttrs (config.networking.hostName != "mauville") { fileSystems = let
"/mnt/Archive" = {
device = "//mauville/Archive";
fsType = "cifs"; fsType = "cifs";
options = [ options = [
"gid=100" "gid=100"
@ -19,23 +17,16 @@
"x-systemd.idle-timeout=60" "x-systemd.idle-timeout=60"
"x-systemd.mount-timeout=5s" "x-systemd.mount-timeout=5s"
]; ];
in
lib.attrsets.optionalAttrs (config.networking.hostName != "mauville") {
"/mnt/Archive" = {
inherit options fsType;
device = "//mauville/Archive";
}; };
"/mnt/Media" = { "/mnt/Media" = {
inherit options fsType;
device = "//mauville/Media"; device = "//mauville/Media";
fsType = "cifs";
options = [
"gid=100"
"guest"
"nofail"
"uid=${toString config.users.users.aly.uid}"
"x-systemd.after=network.target"
"x-systemd.after=tailscaled.service"
"x-systemd.automount"
"x-systemd.device-timeout=5s"
"x-systemd.idle-timeout=60"
"x-systemd.mount-timeout=5s"
];
}; };
}; };