{ 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}" "nofail" ]; 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; }; }; }