{ config, lib, ... }: with lib; let cfg = config.roles.nfs-mounts; in { options.roles.nfs-mounts = { enable = mkEnableOption "Enable default NFS mounts"; # TODO: implement requireMount requireMount = mkOption { type = types.bool; description = "Hard fail if the NFS mounts are not available"; default = false; }; }; config = mkIf cfg.enable { fileSystems."/media" = { device = "10.0.0.43:/media"; fsType = "nfs"; options = [ "defaults" "nofail" "softreval" ]; }; }; }