2025-01-06 20:22:41 -08:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
inherit (lib) mkEnableOption mkIf;
|
|
|
|
|
|
|
|
cfg = config.marleyos.mounts.babeshare;
|
|
|
|
|
|
|
|
user = config.users.users."${config.marleyos.my.name}";
|
|
|
|
uid =
|
|
|
|
if user.uid != null
|
|
|
|
then user.uid
|
|
|
|
else 1000;
|
|
|
|
|
|
|
|
options = [
|
|
|
|
"username=marley"
|
|
|
|
"password=granola chaos lend splendid"
|
|
|
|
"uid=${toString uid}"
|
|
|
|
"gid=${toString config.users.groups."wheel".gid}"
|
2025-01-10 17:19:17 -08:00
|
|
|
"nofail"
|
2025-01-06 20:22:41 -08:00
|
|
|
];
|
|
|
|
in {
|
|
|
|
options.marleyos.mounts.babeshare.enable = mkEnableOption "babeshare";
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
fileSystems."/mnt/babeshare/babez" = {
|
|
|
|
device = "//truenas.blackcat.vip/babez";
|
|
|
|
fsType = "cifs";
|
|
|
|
inherit options;
|
|
|
|
};
|
|
|
|
|
|
|
|
fileSystems."/mnt/babeshare/marley" = {
|
|
|
|
device = "//truenas.blackcat.vip/marley";
|
|
|
|
fsType = "cifs";
|
|
|
|
inherit options;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|