initial commit

This commit is contained in:
Henry Hiles 2025-08-01 15:58:45 -04:00
commit e8e678bc2b
No known key found for this signature in database
23 changed files with 2339 additions and 0 deletions

1
.envrc Normal file
View file

@ -0,0 +1 @@
use flake

3
.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
.dart_tool/
.direnv
secret

26
.vscode/launch.json vendored Normal file
View file

@ -0,0 +1,26 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "matrix-oauth2oidc",
"program": "bin/nexusbot.dart",
"args": [
"--homeserver",
"https://matrix.federated.nexus",
"--jwtSecretFile",
"secret",
"--issuer",
"http://localhost:8080",
"--authorizeEndpoint",
"http://localhost:4321/login",
"--serviceDomain",
"federated.nexus"
],
"request": "launch",
"type": "dart"
}
]
}

3
CHANGELOG.md Normal file
View file

@ -0,0 +1,3 @@
## 1.0.0
- Initial version.

8
JUSTFILE Normal file
View file

@ -0,0 +1,8 @@
watch:
dart run build_runner watch
build:
dart run build_runner build
test:
oauth2c http://localhost:8080 --client-id yourclientid --scopes openid --grant-type authorization_code --auth-method none --response-mode query

1
README.md Normal file
View file

@ -0,0 +1 @@
A bot to automate the sign-up process for Federated Nexus.

30
analysis_options.yaml Normal file
View file

@ -0,0 +1,30 @@
# This file configures the static analysis results for your project (errors,
# warnings, and lints).
#
# This enables the "recommended" set of lints from `package:lints`.
# This set helps identify many issues that may lead to problems when running
# or consuming Dart code, and enforces writing Dart using a single, idiomatic
# style and format.
#
# If you want a smaller set of lints you can change this to specify
# "package:lints/core.yaml". These are just the most critical lints
# (the recommended set includes the core lints).
# The core lints are also what is used by pub.dev for scoring packages.
include: package:lints/recommended.yaml
# Uncomment the following section to specify additional rules.
# linter:
# rules:
# - camel_case_types
# analyzer:
# exclude:
# - path/to/excluded/files/**
# For more information about the core and recommended set of lints, see
# https://dart.dev/go/core-lints
# For additional information about configuring this file, see
# https://dart.dev/guides/language/analysis-options

42
bin/matrixoidc.dart Normal file
View file

@ -0,0 +1,42 @@
import "dart:io";
import "package:cli_tools/config.dart";
import "package:nexusbot/controllers/settings_controller.dart";
import "package:nexusbot/helpers/api_helper.dart";
import "package:riverpod/riverpod.dart";
import "package:shelf/shelf.dart";
import "package:shelf/shelf_io.dart";
import "package:shelf_router/shelf_router.dart";
void main(List<String> argsRaw) async {
final parser = ConfigParser()
..addOption("socket", abbr: "s", mandatory: true)
..addOption("homeserver", abbr: "h", mandatory: true)
..addOption("foundUri", abbr: "f", mandatory: true)
..addOption("name", abbr: "n", mandatory: true)
..addOption("adminRoom", abbr: "a", mandatory: true)
..addOption("botPasswordFile", abbr: "b", mandatory: true)
..addOption("smtpPasswordFile", abbr: "p", mandatory: true)
..addOption("inviteTo", abbr: "i");
final container = ProviderContainer();
container
.read(SettingsController.provider.notifier)
.set(parser.parse(argsRaw));
final apiHelper = container.read(ApiHelper.provider);
final handler = const Pipeline()
.addMiddleware(logRequests())
.addHandler((Router()..post("/", apiHelper.register)).call);
final settings = container.read(SettingsController.provider)!;
final server = HttpServer.listenOn(
await ServerSocket.bind(
InternetAddress(settings.socket, type: InternetAddressType.unix),
0,
),
);
serveRequests(server, handler);
print("Bot listening at ${server.address.address}");
}

61
flake.lock generated Normal file
View file

@ -0,0 +1,61 @@
{
"nodes": {
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1749398372,
"narHash": "sha256-tYBdgS56eXYaWVW3fsnPQ/nFlgWi/Z2Ymhyu21zVM98=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "9305fe4e5c2a6fcf5ba6a3ff155720fbe4076569",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1750134718,
"narHash": "sha256-v263g4GbxXv87hMXMCpjkIxd/viIF7p3JpJrwgKdNiI=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "9e83b64f727c88a7711a2c463a7b16eedb69a84c",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1748740939,
"narHash": "sha256-rQaysilft1aVMwF14xIdGS3sj1yHlI6oKQNBRTF40cc=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "656a64127e9d791a334452c6b6606d17539476e2",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"root": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

43
flake.nix Normal file
View file

@ -0,0 +1,43 @@
{
inputs = {
flake-parts.url = "github:hercules-ci/flake-parts";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs = inputs:
inputs.flake-parts.lib.mkFlake {inherit inputs;} {
systems = ["x86_64-linux" "aarch64-linux"];
perSystem = {
lib,
pkgs,
system,
...
}: {
_module.args.pkgs = import inputs.nixpkgs {inherit system;};
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [just dart watchexec];
};
packages.default = pkgs.buildDartApplication {
pname = "nexusbot";
version = "1.0.0";
src = ./.;
dartConfigHook = "packageRun build_runner build";
pubspecLock = lib.importJSON ./pubspec.lock.json;
preInstall = "set -x";
meta = {
homepage = "https://git.federated.nexus/Henry-Hiles/nexusbot";
description = "A bot to automate the sign-up process for Federated Nexus.";
mainProgram = "nexusbot";
license = lib.licenses.gpl3Plus;
maintainers = [lib.maintainers.quadradical];
};
};
};
flake.nixosModules.default = import ./module.nix inputs.self;
};
}

View file

@ -0,0 +1,36 @@
import "dart:io";
import "dart:convert";
import "package:http/http.dart";
import "package:nexusbot/controllers/settings_controller.dart";
import "package:riverpod/riverpod.dart";
class LoginController extends AsyncNotifier<String> {
@override
Future<String> build() async {
final settings = ref.watch(SettingsController.provider)!;
final response = await post(
settings.homeserver.replace(path: "_matrix/client/v3/login"),
headers: {HttpHeaders.contentTypeHeader: "application/json"},
body: json.encode({
"type": "m.login.password",
"device_id": "script",
"identifier": {"type": "m.id.user", "user": settings.name},
"password": (await File(
settings.botPasswordFile,
).readAsString()).trim(),
}),
);
if (response.statusCode != 200) {
throw Exception(
"Login failed, check your name, homeserver and botPasswordFile: ${response.body}",
);
}
return json.decode(response.body)["access_token"];
}
static final provider = AsyncNotifierProvider<LoginController, String>(
LoginController.new,
);
}

View file

@ -0,0 +1,16 @@
import "package:args/args.dart";
import "package:nexusbot/models/settings.dart";
import "package:riverpod/riverpod.dart";
class SettingsController extends Notifier<Settings?> {
@override
Settings? build() => null;
void set(ArgResults args) => state = Settings.fromJson(<String, dynamic>{
for (final opt in args.options) opt: args.option(opt),
});
static final provider = NotifierProvider<SettingsController, Settings?>(
SettingsController.new,
);
}

View file

@ -0,0 +1,66 @@
import "dart:convert";
import "dart:io";
import "package:nexusbot/controllers/login_controller.dart";
import "package:nexusbot/controllers/settings_controller.dart";
import "package:nexusbot/models/registration.dart";
import "package:shelf/shelf.dart";
import "package:http/http.dart" as http;
import "package:riverpod/riverpod.dart";
class ApiHelper {
final Ref ref;
ApiHelper(this.ref);
String getTxn() => DateTime.now().millisecondsSinceEpoch.toString();
Future<Map<String, String>> getHeaders() async => {
HttpHeaders.contentTypeHeader: "application/json",
HttpHeaders.authorizationHeader:
"Bearer ${await ref.watch(LoginController.provider.future)}",
};
Future<String> getRoomId(String alias) async {
final settings = ref.watch(SettingsController.provider)!;
final response = await http.get(
settings.homeserver.replace(
path: "_matrix/client/v3/directory/room/$alias",
),
headers: await getHeaders(),
);
if (response.statusCode != 200) {
throw Exception("Alias lookup failed for $alias: ${response.body}");
}
return json.decode(response.body)["room_id"];
}
Future<Response> register(Request request) async {
final settings = ref.read(SettingsController.provider)!;
final registration = Registration.fromJson(
json.decode(await request.readAsString()),
);
final response = await http.post(
settings.homeserver.replace(
path:
"_matrix/client/v3/rooms/${getRoomId(settings.adminRoom)}/send/m.room.message/${getTxn()}",
),
headers: await getHeaders(),
body: json.encode({
"msgtype": "m.text",
"body":
"Signup request from ${registration.username}, email is: ${registration.email}.",
}),
);
if (response.statusCode != 200) {
throw Exception(
"Registration failed for ${registration.username}: ${response.body}",
);
}
return Response.found(settings.foundUri);
}
static final provider = Provider<ApiHelper>(ApiHelper.new);
}

View file

@ -0,0 +1,15 @@
import "package:freezed_annotation/freezed_annotation.dart";
part "registration.freezed.dart";
part "registration.g.dart";
@freezed
abstract class Registration with _$Registration {
const factory Registration({
required String email,
required String username,
}) = _Registration;
factory Registration.fromJson(Map<String, dynamic> json) =>
_$RegistrationFromJson(json);
}

View file

@ -0,0 +1,151 @@
// dart format width=80
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'registration.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$Registration {
String get email; String get username;
/// Create a copy of Registration
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$RegistrationCopyWith<Registration> get copyWith => _$RegistrationCopyWithImpl<Registration>(this as Registration, _$identity);
/// Serializes this Registration to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is Registration&&(identical(other.email, email) || other.email == email)&&(identical(other.username, username) || other.username == username));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,email,username);
@override
String toString() {
return 'Registration(email: $email, username: $username)';
}
}
/// @nodoc
abstract mixin class $RegistrationCopyWith<$Res> {
factory $RegistrationCopyWith(Registration value, $Res Function(Registration) _then) = _$RegistrationCopyWithImpl;
@useResult
$Res call({
String email, String username
});
}
/// @nodoc
class _$RegistrationCopyWithImpl<$Res>
implements $RegistrationCopyWith<$Res> {
_$RegistrationCopyWithImpl(this._self, this._then);
final Registration _self;
final $Res Function(Registration) _then;
/// Create a copy of Registration
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? email = null,Object? username = null,}) {
return _then(_self.copyWith(
email: null == email ? _self.email : email // ignore: cast_nullable_to_non_nullable
as String,username: null == username ? _self.username : username // ignore: cast_nullable_to_non_nullable
as String,
));
}
}
/// @nodoc
@JsonSerializable()
class _Registration implements Registration {
const _Registration({required this.email, required this.username});
factory _Registration.fromJson(Map<String, dynamic> json) => _$RegistrationFromJson(json);
@override final String email;
@override final String username;
/// Create a copy of Registration
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$RegistrationCopyWith<_Registration> get copyWith => __$RegistrationCopyWithImpl<_Registration>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$RegistrationToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Registration&&(identical(other.email, email) || other.email == email)&&(identical(other.username, username) || other.username == username));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,email,username);
@override
String toString() {
return 'Registration(email: $email, username: $username)';
}
}
/// @nodoc
abstract mixin class _$RegistrationCopyWith<$Res> implements $RegistrationCopyWith<$Res> {
factory _$RegistrationCopyWith(_Registration value, $Res Function(_Registration) _then) = __$RegistrationCopyWithImpl;
@override @useResult
$Res call({
String email, String username
});
}
/// @nodoc
class __$RegistrationCopyWithImpl<$Res>
implements _$RegistrationCopyWith<$Res> {
__$RegistrationCopyWithImpl(this._self, this._then);
final _Registration _self;
final $Res Function(_Registration) _then;
/// Create a copy of Registration
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? email = null,Object? username = null,}) {
return _then(_Registration(
email: null == email ? _self.email : email // ignore: cast_nullable_to_non_nullable
as String,username: null == username ? _self.username : username // ignore: cast_nullable_to_non_nullable
as String,
));
}
}
// dart format on

View file

@ -0,0 +1,16 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'registration.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_Registration _$RegistrationFromJson(Map<String, dynamic> json) =>
_Registration(
email: json['email'] as String,
username: json['username'] as String,
);
Map<String, dynamic> _$RegistrationToJson(_Registration instance) =>
<String, dynamic>{'email': instance.email, 'username': instance.username};

21
lib/models/settings.dart Normal file
View file

@ -0,0 +1,21 @@
import "package:freezed_annotation/freezed_annotation.dart";
part "settings.freezed.dart";
part "settings.g.dart";
@freezed
abstract class Settings with _$Settings {
const factory Settings({
required String socket,
required Uri homeserver,
required Uri foundUri,
required String name,
required String adminRoom,
required String botPasswordFile,
required String smtpPasswordFile,
required String? inviteTo,
}) = _Settings;
factory Settings.fromJson(Map<String, dynamic> json) =>
_$SettingsFromJson(json);
}

View file

@ -0,0 +1,169 @@
// dart format width=80
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'settings.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$Settings {
String get socket; Uri get homeserver; Uri get foundUri; String get name; String get adminRoom; String get botPasswordFile; String get smtpPasswordFile; String? get inviteTo;
/// Create a copy of Settings
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$SettingsCopyWith<Settings> get copyWith => _$SettingsCopyWithImpl<Settings>(this as Settings, _$identity);
/// Serializes this Settings to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is Settings&&(identical(other.socket, socket) || other.socket == socket)&&(identical(other.homeserver, homeserver) || other.homeserver == homeserver)&&(identical(other.foundUri, foundUri) || other.foundUri == foundUri)&&(identical(other.name, name) || other.name == name)&&(identical(other.adminRoom, adminRoom) || other.adminRoom == adminRoom)&&(identical(other.botPasswordFile, botPasswordFile) || other.botPasswordFile == botPasswordFile)&&(identical(other.smtpPasswordFile, smtpPasswordFile) || other.smtpPasswordFile == smtpPasswordFile)&&(identical(other.inviteTo, inviteTo) || other.inviteTo == inviteTo));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,socket,homeserver,foundUri,name,adminRoom,botPasswordFile,smtpPasswordFile,inviteTo);
@override
String toString() {
return 'Settings(socket: $socket, homeserver: $homeserver, foundUri: $foundUri, name: $name, adminRoom: $adminRoom, botPasswordFile: $botPasswordFile, smtpPasswordFile: $smtpPasswordFile, inviteTo: $inviteTo)';
}
}
/// @nodoc
abstract mixin class $SettingsCopyWith<$Res> {
factory $SettingsCopyWith(Settings value, $Res Function(Settings) _then) = _$SettingsCopyWithImpl;
@useResult
$Res call({
String socket, Uri homeserver, Uri foundUri, String name, String adminRoom, String botPasswordFile, String smtpPasswordFile, String? inviteTo
});
}
/// @nodoc
class _$SettingsCopyWithImpl<$Res>
implements $SettingsCopyWith<$Res> {
_$SettingsCopyWithImpl(this._self, this._then);
final Settings _self;
final $Res Function(Settings) _then;
/// Create a copy of Settings
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? socket = null,Object? homeserver = null,Object? foundUri = null,Object? name = null,Object? adminRoom = null,Object? botPasswordFile = null,Object? smtpPasswordFile = null,Object? inviteTo = freezed,}) {
return _then(_self.copyWith(
socket: null == socket ? _self.socket : socket // ignore: cast_nullable_to_non_nullable
as String,homeserver: null == homeserver ? _self.homeserver : homeserver // ignore: cast_nullable_to_non_nullable
as Uri,foundUri: null == foundUri ? _self.foundUri : foundUri // ignore: cast_nullable_to_non_nullable
as Uri,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
as String,adminRoom: null == adminRoom ? _self.adminRoom : adminRoom // ignore: cast_nullable_to_non_nullable
as String,botPasswordFile: null == botPasswordFile ? _self.botPasswordFile : botPasswordFile // ignore: cast_nullable_to_non_nullable
as String,smtpPasswordFile: null == smtpPasswordFile ? _self.smtpPasswordFile : smtpPasswordFile // ignore: cast_nullable_to_non_nullable
as String,inviteTo: freezed == inviteTo ? _self.inviteTo : inviteTo // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// @nodoc
@JsonSerializable()
class _Settings implements Settings {
const _Settings({required this.socket, required this.homeserver, required this.foundUri, required this.name, required this.adminRoom, required this.botPasswordFile, required this.smtpPasswordFile, required this.inviteTo});
factory _Settings.fromJson(Map<String, dynamic> json) => _$SettingsFromJson(json);
@override final String socket;
@override final Uri homeserver;
@override final Uri foundUri;
@override final String name;
@override final String adminRoom;
@override final String botPasswordFile;
@override final String smtpPasswordFile;
@override final String? inviteTo;
/// Create a copy of Settings
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$SettingsCopyWith<_Settings> get copyWith => __$SettingsCopyWithImpl<_Settings>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$SettingsToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Settings&&(identical(other.socket, socket) || other.socket == socket)&&(identical(other.homeserver, homeserver) || other.homeserver == homeserver)&&(identical(other.foundUri, foundUri) || other.foundUri == foundUri)&&(identical(other.name, name) || other.name == name)&&(identical(other.adminRoom, adminRoom) || other.adminRoom == adminRoom)&&(identical(other.botPasswordFile, botPasswordFile) || other.botPasswordFile == botPasswordFile)&&(identical(other.smtpPasswordFile, smtpPasswordFile) || other.smtpPasswordFile == smtpPasswordFile)&&(identical(other.inviteTo, inviteTo) || other.inviteTo == inviteTo));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,socket,homeserver,foundUri,name,adminRoom,botPasswordFile,smtpPasswordFile,inviteTo);
@override
String toString() {
return 'Settings(socket: $socket, homeserver: $homeserver, foundUri: $foundUri, name: $name, adminRoom: $adminRoom, botPasswordFile: $botPasswordFile, smtpPasswordFile: $smtpPasswordFile, inviteTo: $inviteTo)';
}
}
/// @nodoc
abstract mixin class _$SettingsCopyWith<$Res> implements $SettingsCopyWith<$Res> {
factory _$SettingsCopyWith(_Settings value, $Res Function(_Settings) _then) = __$SettingsCopyWithImpl;
@override @useResult
$Res call({
String socket, Uri homeserver, Uri foundUri, String name, String adminRoom, String botPasswordFile, String smtpPasswordFile, String? inviteTo
});
}
/// @nodoc
class __$SettingsCopyWithImpl<$Res>
implements _$SettingsCopyWith<$Res> {
__$SettingsCopyWithImpl(this._self, this._then);
final _Settings _self;
final $Res Function(_Settings) _then;
/// Create a copy of Settings
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? socket = null,Object? homeserver = null,Object? foundUri = null,Object? name = null,Object? adminRoom = null,Object? botPasswordFile = null,Object? smtpPasswordFile = null,Object? inviteTo = freezed,}) {
return _then(_Settings(
socket: null == socket ? _self.socket : socket // ignore: cast_nullable_to_non_nullable
as String,homeserver: null == homeserver ? _self.homeserver : homeserver // ignore: cast_nullable_to_non_nullable
as Uri,foundUri: null == foundUri ? _self.foundUri : foundUri // ignore: cast_nullable_to_non_nullable
as Uri,name: null == name ? _self.name : name // ignore: cast_nullable_to_non_nullable
as String,adminRoom: null == adminRoom ? _self.adminRoom : adminRoom // ignore: cast_nullable_to_non_nullable
as String,botPasswordFile: null == botPasswordFile ? _self.botPasswordFile : botPasswordFile // ignore: cast_nullable_to_non_nullable
as String,smtpPasswordFile: null == smtpPasswordFile ? _self.smtpPasswordFile : smtpPasswordFile // ignore: cast_nullable_to_non_nullable
as String,inviteTo: freezed == inviteTo ? _self.inviteTo : inviteTo // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
// dart format on

View file

@ -0,0 +1,29 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'settings.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_Settings _$SettingsFromJson(Map<String, dynamic> json) => _Settings(
socket: json['socket'] as String,
homeserver: Uri.parse(json['homeserver'] as String),
foundUri: Uri.parse(json['foundUri'] as String),
name: json['name'] as String,
adminRoom: json['adminRoom'] as String,
botPasswordFile: json['botPasswordFile'] as String,
smtpPasswordFile: json['smtpPasswordFile'] as String,
inviteTo: json['inviteTo'] as String?,
);
Map<String, dynamic> _$SettingsToJson(_Settings instance) => <String, dynamic>{
'socket': instance.socket,
'homeserver': instance.homeserver.toString(),
'foundUri': instance.foundUri.toString(),
'name': instance.name,
'adminRoom': instance.adminRoom,
'botPasswordFile': instance.botPasswordFile,
'smtpPasswordFile': instance.smtpPasswordFile,
'inviteTo': instance.inviteTo,
};

85
module.nix Normal file
View file

@ -0,0 +1,85 @@
self: {
config,
lib,
pkgs,
utils,
...
}: let
cfg = config.services.nexusbot;
in {
meta.maintainers = with lib.maintainers; [quadradical];
options.services.nexusbot = {
enable = lib.mkEnableOption "the nexusbot server";
package = lib.mkPackageOption self.packages.${pkgs.system} "default" {};
botPasswordFile = lib.mkOption {
type = lib.types.path;
};
smtpPasswordFile = lib.mkOption {
type = lib.types.path;
};
group = lib.mkOption {
type = lib.types.str;
default = "nexusbot";
};
args = lib.mkOption {
type = with lib.types; listOf str;
default = [];
};
};
config = lib.mkIf cfg.enable {
systemd.services.nexusbot = {
description = "nexusbot server";
documentation = ["https://git.federated.nexus/Henry-Hiles/nexusbot"];
wantedBy = ["multi-user.target"];
wants = ["network-online.target"];
after = ["network-online.target"];
serviceConfig = {
LoadCredential = ["bot-password:${cfg.botPasswordFile}" "smtp-password:${cfg.smtpPasswordFile}"];
ExecStart = utils.escapeSystemdExecArgs ([
(lib.getExe cfg.package)
"--botPasswordFile=/run/credentials/nexusbot.service/bot-password"
"--smtpPasswordFile=/run/credentials/nexusbot.service/smtp-password"
]
++ cfg.args);
DynamicUser = true;
LockPersonality = true;
MemoryDenyWriteExecute = true;
ProtectClock = true;
ProtectControlGroups = true;
ProtectHostname = true;
ProtectKernelLogs = true;
ProtectKernelModules = true;
ProtectKernelTunables = true;
PrivateDevices = true;
PrivateMounts = true;
RestrictAddressFamilies = [
"AF_UNIX"
"AF_INET"
"AF_INET6"
];
RestrictNamespaces = true;
RestrictRealtime = true;
ProtectHome = true;
SystemCallArchitectures = "native";
SystemCallFilter = [
"@system-service"
"~@privileged"
"~@resources"
];
Restart = "on-failure";
RestartSec = 5;
UMask = 007;
RuntimeDirectory = "nexusbot";
RuntimeDirectoryMode = 0770;
Group = cfg.group;
};
};
};
}

693
pubspec.lock Normal file
View file

@ -0,0 +1,693 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
_fe_analyzer_shared:
dependency: transitive
description:
name: _fe_analyzer_shared
sha256: e55636ed79578b9abca5fecf9437947798f5ef7456308b5cb85720b793eac92f
url: "https://pub.dev"
source: hosted
version: "82.0.0"
analyzer:
dependency: transitive
description:
name: analyzer
sha256: "904ae5bb474d32c38fb9482e2d925d5454cda04ddd0e55d2e6826bc72f6ba8c0"
url: "https://pub.dev"
source: hosted
version: "7.4.5"
args:
dependency: "direct main"
description:
name: args
sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04
url: "https://pub.dev"
source: hosted
version: "2.7.0"
asn1lib:
dependency: transitive
description:
name: asn1lib
sha256: "9a8f69025044eb466b9b60ef3bc3ac99b4dc6c158ae9c56d25eeccf5bc56d024"
url: "https://pub.dev"
source: hosted
version: "1.6.5"
async:
dependency: transitive
description:
name: async
sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb"
url: "https://pub.dev"
source: hosted
version: "2.13.0"
basic_utils:
dependency: transitive
description:
name: basic_utils
sha256: "2064b21d3c41ed7654bc82cc476fd65542e04d60059b74d5eed490a4da08fc6c"
url: "https://pub.dev"
source: hosted
version: "5.7.0"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea"
url: "https://pub.dev"
source: hosted
version: "2.1.2"
build:
dependency: transitive
description:
name: build
sha256: "486337d40a48d75049f2a01efceefc1412e3a6d6342d39624753e7d5a4e70016"
url: "https://pub.dev"
source: hosted
version: "2.5.1"
build_config:
dependency: transitive
description:
name: build_config
sha256: "4ae2de3e1e67ea270081eaee972e1bd8f027d459f249e0f1186730784c2e7e33"
url: "https://pub.dev"
source: hosted
version: "1.1.2"
build_daemon:
dependency: transitive
description:
name: build_daemon
sha256: "8e928697a82be082206edb0b9c99c5a4ad6bc31c9e9b8b2f291ae65cd4a25daa"
url: "https://pub.dev"
source: hosted
version: "4.0.4"
build_resolvers:
dependency: transitive
description:
name: build_resolvers
sha256: abe6e4b5b36ce2bf01aec8f2a59424d1ecfc3cb340e7145a64359adc7233a0d1
url: "https://pub.dev"
source: hosted
version: "2.5.1"
build_runner:
dependency: "direct dev"
description:
name: build_runner
sha256: "398ec7898b9b60be126067835a8202240b26dc54aa34d91d0198a539dcd5942e"
url: "https://pub.dev"
source: hosted
version: "2.5.1"
build_runner_core:
dependency: transitive
description:
name: build_runner_core
sha256: "9821dbf604ed74a6dabeaba0c33ac58190332ea238862a62cdf25fc8eba226b8"
url: "https://pub.dev"
source: hosted
version: "9.0.1"
built_collection:
dependency: transitive
description:
name: built_collection
sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100"
url: "https://pub.dev"
source: hosted
version: "5.1.1"
built_value:
dependency: transitive
description:
name: built_value
sha256: "082001b5c3dc495d4a42f1d5789990505df20d8547d42507c29050af6933ee27"
url: "https://pub.dev"
source: hosted
version: "8.10.1"
checked_yaml:
dependency: transitive
description:
name: checked_yaml
sha256: "959525d3162f249993882720d52b7e0c833978df229be20702b33d48d91de70f"
url: "https://pub.dev"
source: hosted
version: "2.0.4"
ci:
dependency: transitive
description:
name: ci
sha256: "145d095ce05cddac4d797a158bc4cf3b6016d1fe63d8c3d2fbd7212590adca13"
url: "https://pub.dev"
source: hosted
version: "0.1.0"
cli_tools:
dependency: "direct main"
description:
name: cli_tools
sha256: ed6d1cef6e34ff3d68e7c798c3d18f497a311ac8082533340a4a914b12344717
url: "https://pub.dev"
source: hosted
version: "0.6.0"
clock:
dependency: transitive
description:
name: clock
sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b
url: "https://pub.dev"
source: hosted
version: "1.1.2"
code_builder:
dependency: transitive
description:
name: code_builder
sha256: "0ec10bf4a89e4c613960bf1e8b42c64127021740fb21640c29c909826a5eea3e"
url: "https://pub.dev"
source: hosted
version: "4.10.1"
collection:
dependency: transitive
description:
name: collection
sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76"
url: "https://pub.dev"
source: hosted
version: "1.19.1"
convert:
dependency: transitive
description:
name: convert
sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68
url: "https://pub.dev"
source: hosted
version: "3.1.2"
crypto:
dependency: transitive
description:
name: crypto
sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855"
url: "https://pub.dev"
source: hosted
version: "3.0.6"
dart_mappable:
dependency: transitive
description:
name: dart_mappable
sha256: "2255b2c00e328a65fef5a8df2dabfc0dc9c2e518c33a50051a4519b1c7a28c48"
url: "https://pub.dev"
source: hosted
version: "4.5.0"
dart_style:
dependency: transitive
description:
name: dart_style
sha256: "5b236382b47ee411741447c1f1e111459c941ea1b3f2b540dde54c210a3662af"
url: "https://pub.dev"
source: hosted
version: "3.1.0"
encrypt:
dependency: transitive
description:
name: encrypt
sha256: "62d9aa4670cc2a8798bab89b39fc71b6dfbacf615de6cf5001fb39f7e4a996a2"
url: "https://pub.dev"
source: hosted
version: "5.0.3"
enough_convert:
dependency: transitive
description:
name: enough_convert
sha256: c67d85ca21aaa0648f155907362430701db41f7ec8e6501a58ad9cd9d8569d01
url: "https://pub.dev"
source: hosted
version: "1.6.0"
enough_mail:
dependency: "direct main"
description:
name: enough_mail
sha256: a88d8c56907caeffdebc4cf34f3a5665c09a8d7496ef5e09b3166f41cf409f81
url: "https://pub.dev"
source: hosted
version: "2.1.6"
event_bus:
dependency: transitive
description:
name: event_bus
sha256: "1a55e97923769c286d295240048fc180e7b0768902c3c2e869fe059aafa15304"
url: "https://pub.dev"
source: hosted
version: "2.0.1"
fast_immutable_collections:
dependency: "direct main"
description:
name: fast_immutable_collections
sha256: d1aa3d7788fab06cce7f303f4969c7a16a10c865e1bd2478291a8ebcbee084e5
url: "https://pub.dev"
source: hosted
version: "11.0.4"
file:
dependency: transitive
description:
name: file
sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4
url: "https://pub.dev"
source: hosted
version: "7.0.1"
fixnum:
dependency: transitive
description:
name: fixnum
sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be
url: "https://pub.dev"
source: hosted
version: "1.1.1"
freezed:
dependency: "direct dev"
description:
name: freezed
sha256: "6022db4c7bfa626841b2a10f34dd1e1b68e8f8f9650db6112dcdeeca45ca793c"
url: "https://pub.dev"
source: hosted
version: "3.0.6"
freezed_annotation:
dependency: "direct main"
description:
name: freezed_annotation
sha256: c87ff004c8aa6af2d531668b46a4ea379f7191dc6dfa066acd53d506da6e044b
url: "https://pub.dev"
source: hosted
version: "3.0.0"
frontend_server_client:
dependency: transitive
description:
name: frontend_server_client
sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694
url: "https://pub.dev"
source: hosted
version: "4.0.0"
glob:
dependency: transitive
description:
name: glob
sha256: c3f1ee72c96f8f78935e18aa8cecced9ab132419e8625dc187e1c2408efc20de
url: "https://pub.dev"
source: hosted
version: "2.1.3"
graphs:
dependency: transitive
description:
name: graphs
sha256: "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0"
url: "https://pub.dev"
source: hosted
version: "2.3.2"
http:
dependency: "direct main"
description:
name: http
sha256: "2c11f3f94c687ee9bad77c171151672986360b2b001d109814ee7140b2cf261b"
url: "https://pub.dev"
source: hosted
version: "1.4.0"
http_methods:
dependency: transitive
description:
name: http_methods
sha256: "6bccce8f1ec7b5d701e7921dca35e202d425b57e317ba1a37f2638590e29e566"
url: "https://pub.dev"
source: hosted
version: "1.1.1"
http_multi_server:
dependency: transitive
description:
name: http_multi_server
sha256: aa6199f908078bb1c5efb8d8638d4ae191aac11b311132c3ef48ce352fb52ef8
url: "https://pub.dev"
source: hosted
version: "3.2.2"
http_parser:
dependency: transitive
description:
name: http_parser
sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571"
url: "https://pub.dev"
source: hosted
version: "4.1.2"
intl:
dependency: transitive
description:
name: intl
sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf
url: "https://pub.dev"
source: hosted
version: "0.19.0"
io:
dependency: transitive
description:
name: io
sha256: dfd5a80599cf0165756e3181807ed3e77daf6dd4137caaad72d0b7931597650b
url: "https://pub.dev"
source: hosted
version: "1.0.5"
js:
dependency: transitive
description:
name: js
sha256: "53385261521cc4a0c4658fd0ad07a7d14591cf8fc33abbceae306ddb974888dc"
url: "https://pub.dev"
source: hosted
version: "0.7.2"
json_annotation:
dependency: "direct main"
description:
name: json_annotation
sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1"
url: "https://pub.dev"
source: hosted
version: "4.9.0"
json_serializable:
dependency: "direct dev"
description:
name: json_serializable
sha256: c50ef5fc083d5b5e12eef489503ba3bf5ccc899e487d691584699b4bdefeea8c
url: "https://pub.dev"
source: hosted
version: "6.9.5"
lints:
dependency: "direct dev"
description:
name: lints
sha256: a5e2b223cb7c9c8efdc663ef484fdd95bb243bff242ef5b13e26883547fce9a0
url: "https://pub.dev"
source: hosted
version: "6.0.0"
logging:
dependency: transitive
description:
name: logging
sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61
url: "https://pub.dev"
source: hosted
version: "1.3.0"
matcher:
dependency: transitive
description:
name: matcher
sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2
url: "https://pub.dev"
source: hosted
version: "0.12.17"
meta:
dependency: transitive
description:
name: meta
sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394"
url: "https://pub.dev"
source: hosted
version: "1.17.0"
mime:
dependency: transitive
description:
name: mime
sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6"
url: "https://pub.dev"
source: hosted
version: "2.0.0"
oauth2:
dependency: transitive
description:
name: oauth2
sha256: c84470642cbb2bec450ccab2f8520c079cd1ca546a76ffd5c40589e07f4e8bf4
url: "https://pub.dev"
source: hosted
version: "2.0.3"
package_config:
dependency: transitive
description:
name: package_config
sha256: f096c55ebb7deb7e384101542bfba8c52696c1b56fca2eb62827989ef2353bbc
url: "https://pub.dev"
source: hosted
version: "2.2.0"
path:
dependency: transitive
description:
name: path
sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5"
url: "https://pub.dev"
source: hosted
version: "1.9.1"
petitparser:
dependency: transitive
description:
name: petitparser
sha256: "9436fe11f82d7cc1642a8671e5aa4149ffa9ae9116e6cf6dd665fc0653e3825c"
url: "https://pub.dev"
source: hosted
version: "7.0.0"
pointycastle:
dependency: transitive
description:
name: pointycastle
sha256: "4be0097fcf3fd3e8449e53730c631200ebc7b88016acecab2b0da2f0149222fe"
url: "https://pub.dev"
source: hosted
version: "3.9.1"
pool:
dependency: transitive
description:
name: pool
sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a"
url: "https://pub.dev"
source: hosted
version: "1.5.1"
pub_api_client:
dependency: transitive
description:
name: pub_api_client
sha256: b9c0184ce4a562d8cf2ebd7be235a25aa158b7c01bdef863cccadc5894644e26
url: "https://pub.dev"
source: hosted
version: "3.1.1"
pub_semver:
dependency: transitive
description:
name: pub_semver
sha256: "5bfcf68ca79ef689f8990d1160781b4bad40a3bd5e5218ad4076ddb7f4081585"
url: "https://pub.dev"
source: hosted
version: "2.2.0"
pubspec_parse:
dependency: transitive
description:
name: pubspec_parse
sha256: "0560ba233314abbed0a48a2956f7f022cce7c3e1e73df540277da7544cad4082"
url: "https://pub.dev"
source: hosted
version: "1.5.0"
rfc_6901:
dependency: transitive
description:
name: rfc_6901
sha256: df1bbfa3d023009598f19636d6114c6ac1e0b7bb7bf6a260f0e6e6ce91416820
url: "https://pub.dev"
source: hosted
version: "0.2.0"
riverpod:
dependency: "direct main"
description:
name: riverpod
sha256: "59062512288d3056b2321804332a13ffdd1bf16df70dcc8e506e411280a72959"
url: "https://pub.dev"
source: hosted
version: "2.6.1"
shelf:
dependency: "direct main"
description:
name: shelf
sha256: e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12
url: "https://pub.dev"
source: hosted
version: "1.4.2"
shelf_router:
dependency: "direct main"
description:
name: shelf_router
sha256: f5e5d492440a7fb165fe1e2e1a623f31f734d3370900070b2b1e0d0428d59864
url: "https://pub.dev"
source: hosted
version: "1.1.4"
shelf_web_socket:
dependency: transitive
description:
name: shelf_web_socket
sha256: "3632775c8e90d6c9712f883e633716432a27758216dfb61bd86a8321c0580925"
url: "https://pub.dev"
source: hosted
version: "3.0.0"
source_gen:
dependency: transitive
description:
name: source_gen
sha256: "35c8150ece9e8c8d263337a265153c3329667640850b9304861faea59fc98f6b"
url: "https://pub.dev"
source: hosted
version: "2.0.0"
source_helper:
dependency: transitive
description:
name: source_helper
sha256: "86d247119aedce8e63f4751bd9626fc9613255935558447569ad42f9f5b48b3c"
url: "https://pub.dev"
source: hosted
version: "1.3.5"
source_span:
dependency: transitive
description:
name: source_span
sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c"
url: "https://pub.dev"
source: hosted
version: "1.10.1"
stack_trace:
dependency: transitive
description:
name: stack_trace
sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1"
url: "https://pub.dev"
source: hosted
version: "1.12.1"
state_notifier:
dependency: transitive
description:
name: state_notifier
sha256: b8677376aa54f2d7c58280d5a007f9e8774f1968d1fb1c096adcb4792fba29bb
url: "https://pub.dev"
source: hosted
version: "1.0.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d"
url: "https://pub.dev"
source: hosted
version: "2.1.4"
stream_transform:
dependency: transitive
description:
name: stream_transform
sha256: ad47125e588cfd37a9a7f86c7d6356dde8dfe89d071d293f80ca9e9273a33871
url: "https://pub.dev"
source: hosted
version: "2.1.1"
string_scanner:
dependency: transitive
description:
name: string_scanner
sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43"
url: "https://pub.dev"
source: hosted
version: "1.4.1"
super_string:
dependency: transitive
description:
name: super_string
sha256: ba41acf9fbb318b3fc0d57c9235779100394d85d83f45ab533615df1f3146ea7
url: "https://pub.dev"
source: hosted
version: "1.0.3"
synchronized:
dependency: transitive
description:
name: synchronized
sha256: c254ade258ec8282947a0acbbc90b9575b4f19673533ee46f2f6e9b3aeefd7c0
url: "https://pub.dev"
source: hosted
version: "3.4.0"
term_glyph:
dependency: transitive
description:
name: term_glyph
sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e"
url: "https://pub.dev"
source: hosted
version: "1.2.2"
test_api:
dependency: transitive
description:
name: test_api
sha256: "522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00"
url: "https://pub.dev"
source: hosted
version: "0.7.6"
timing:
dependency: transitive
description:
name: timing
sha256: "62ee18aca144e4a9f29d212f5a4c6a053be252b895ab14b5821996cff4ed90fe"
url: "https://pub.dev"
source: hosted
version: "1.0.2"
type_plus:
dependency: transitive
description:
name: type_plus
sha256: d5d1019471f0d38b91603adb9b5fd4ce7ab903c879d2fbf1a3f80a630a03fcc9
url: "https://pub.dev"
source: hosted
version: "2.1.1"
typed_data:
dependency: transitive
description:
name: typed_data
sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006
url: "https://pub.dev"
source: hosted
version: "1.4.0"
watcher:
dependency: transitive
description:
name: watcher
sha256: "0b7fd4a0bbc4b92641dbf20adfd7e3fd1398fe17102d94b674234563e110088a"
url: "https://pub.dev"
source: hosted
version: "1.1.2"
web:
dependency: transitive
description:
name: web
sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a"
url: "https://pub.dev"
source: hosted
version: "1.1.1"
web_socket:
dependency: transitive
description:
name: web_socket
sha256: "34d64019aa8e36bf9842ac014bb5d2f5586ca73df5e4d9bf5c936975cae6982c"
url: "https://pub.dev"
source: hosted
version: "1.0.1"
web_socket_channel:
dependency: transitive
description:
name: web_socket_channel
sha256: d645757fb0f4773d602444000a8131ff5d48c9e47adfe9772652dd1a4f2d45c8
url: "https://pub.dev"
source: hosted
version: "3.0.3"
xml:
dependency: transitive
description:
name: xml
sha256: "3202a47961c1a0af6097c9f8c1b492d705248ba309e6f7a72410422c05046851"
url: "https://pub.dev"
source: hosted
version: "6.6.0"
yaml:
dependency: transitive
description:
name: yaml
sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce
url: "https://pub.dev"
source: hosted
version: "3.1.3"
sdks:
dart: ">=3.8.0 <4.0.0"

797
pubspec.lock.json Normal file
View file

@ -0,0 +1,797 @@
{
"packages": {
"_fe_analyzer_shared": {
"dependency": "transitive",
"description": {
"name": "_fe_analyzer_shared",
"sha256": "e55636ed79578b9abca5fecf9437947798f5ef7456308b5cb85720b793eac92f",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "82.0.0"
},
"adaptive_number": {
"dependency": "transitive",
"description": {
"name": "adaptive_number",
"sha256": "3a567544e9b5c9c803006f51140ad544aedc79604fd4f3f2c1380003f97c1d77",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.0.0"
},
"analyzer": {
"dependency": "transitive",
"description": {
"name": "analyzer",
"sha256": "904ae5bb474d32c38fb9482e2d925d5454cda04ddd0e55d2e6826bc72f6ba8c0",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "7.4.5"
},
"args": {
"dependency": "transitive",
"description": {
"name": "args",
"sha256": "d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.7.0"
},
"async": {
"dependency": "transitive",
"description": {
"name": "async",
"sha256": "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.13.0"
},
"boolean_selector": {
"dependency": "transitive",
"description": {
"name": "boolean_selector",
"sha256": "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.1.2"
},
"build": {
"dependency": "transitive",
"description": {
"name": "build",
"sha256": "486337d40a48d75049f2a01efceefc1412e3a6d6342d39624753e7d5a4e70016",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.5.1"
},
"build_config": {
"dependency": "transitive",
"description": {
"name": "build_config",
"sha256": "4ae2de3e1e67ea270081eaee972e1bd8f027d459f249e0f1186730784c2e7e33",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.1.2"
},
"build_daemon": {
"dependency": "transitive",
"description": {
"name": "build_daemon",
"sha256": "8e928697a82be082206edb0b9c99c5a4ad6bc31c9e9b8b2f291ae65cd4a25daa",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "4.0.4"
},
"build_resolvers": {
"dependency": "transitive",
"description": {
"name": "build_resolvers",
"sha256": "abe6e4b5b36ce2bf01aec8f2a59424d1ecfc3cb340e7145a64359adc7233a0d1",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.5.1"
},
"build_runner": {
"dependency": "direct dev",
"description": {
"name": "build_runner",
"sha256": "398ec7898b9b60be126067835a8202240b26dc54aa34d91d0198a539dcd5942e",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.5.1"
},
"build_runner_core": {
"dependency": "transitive",
"description": {
"name": "build_runner_core",
"sha256": "9821dbf604ed74a6dabeaba0c33ac58190332ea238862a62cdf25fc8eba226b8",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "9.0.1"
},
"built_collection": {
"dependency": "transitive",
"description": {
"name": "built_collection",
"sha256": "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "5.1.1"
},
"built_value": {
"dependency": "transitive",
"description": {
"name": "built_value",
"sha256": "082001b5c3dc495d4a42f1d5789990505df20d8547d42507c29050af6933ee27",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "8.10.1"
},
"checked_yaml": {
"dependency": "transitive",
"description": {
"name": "checked_yaml",
"sha256": "959525d3162f249993882720d52b7e0c833978df229be20702b33d48d91de70f",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.0.4"
},
"ci": {
"dependency": "transitive",
"description": {
"name": "ci",
"sha256": "145d095ce05cddac4d797a158bc4cf3b6016d1fe63d8c3d2fbd7212590adca13",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.1.0"
},
"cli_tools": {
"dependency": "direct main",
"description": {
"name": "cli_tools",
"sha256": "ed6d1cef6e34ff3d68e7c798c3d18f497a311ac8082533340a4a914b12344717",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.6.0"
},
"clock": {
"dependency": "transitive",
"description": {
"name": "clock",
"sha256": "fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.1.2"
},
"code_builder": {
"dependency": "transitive",
"description": {
"name": "code_builder",
"sha256": "0ec10bf4a89e4c613960bf1e8b42c64127021740fb21640c29c909826a5eea3e",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "4.10.1"
},
"collection": {
"dependency": "transitive",
"description": {
"name": "collection",
"sha256": "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.19.1"
},
"convert": {
"dependency": "transitive",
"description": {
"name": "convert",
"sha256": "b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.1.2"
},
"crypto": {
"dependency": "transitive",
"description": {
"name": "crypto",
"sha256": "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.0.6"
},
"dart_jsonwebtoken": {
"dependency": "direct main",
"description": {
"name": "dart_jsonwebtoken",
"sha256": "21ce9f8a8712f741e8d6876a9c82c0f8a257fe928c4378a91d8527b92a3fd413",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.2.0"
},
"dart_mappable": {
"dependency": "transitive",
"description": {
"name": "dart_mappable",
"sha256": "2255b2c00e328a65fef5a8df2dabfc0dc9c2e518c33a50051a4519b1c7a28c48",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "4.5.0"
},
"dart_style": {
"dependency": "transitive",
"description": {
"name": "dart_style",
"sha256": "5b236382b47ee411741447c1f1e111459c941ea1b3f2b540dde54c210a3662af",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.1.0"
},
"ed25519_edwards": {
"dependency": "transitive",
"description": {
"name": "ed25519_edwards",
"sha256": "6ce0112d131327ec6d42beede1e5dfd526069b18ad45dcf654f15074ad9276cd",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.3.1"
},
"fast_immutable_collections": {
"dependency": "direct main",
"description": {
"name": "fast_immutable_collections",
"sha256": "d1aa3d7788fab06cce7f303f4969c7a16a10c865e1bd2478291a8ebcbee084e5",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "11.0.4"
},
"file": {
"dependency": "transitive",
"description": {
"name": "file",
"sha256": "a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "7.0.1"
},
"fixnum": {
"dependency": "transitive",
"description": {
"name": "fixnum",
"sha256": "b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.1.1"
},
"freezed": {
"dependency": "direct dev",
"description": {
"name": "freezed",
"sha256": "6022db4c7bfa626841b2a10f34dd1e1b68e8f8f9650db6112dcdeeca45ca793c",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.0.6"
},
"freezed_annotation": {
"dependency": "direct main",
"description": {
"name": "freezed_annotation",
"sha256": "c87ff004c8aa6af2d531668b46a4ea379f7191dc6dfa066acd53d506da6e044b",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.0.0"
},
"frontend_server_client": {
"dependency": "transitive",
"description": {
"name": "frontend_server_client",
"sha256": "f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "4.0.0"
},
"glob": {
"dependency": "transitive",
"description": {
"name": "glob",
"sha256": "c3f1ee72c96f8f78935e18aa8cecced9ab132419e8625dc187e1c2408efc20de",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.1.3"
},
"graphs": {
"dependency": "transitive",
"description": {
"name": "graphs",
"sha256": "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.3.2"
},
"http": {
"dependency": "direct main",
"description": {
"name": "http",
"sha256": "2c11f3f94c687ee9bad77c171151672986360b2b001d109814ee7140b2cf261b",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.4.0"
},
"http_methods": {
"dependency": "transitive",
"description": {
"name": "http_methods",
"sha256": "6bccce8f1ec7b5d701e7921dca35e202d425b57e317ba1a37f2638590e29e566",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.1.1"
},
"http_multi_server": {
"dependency": "transitive",
"description": {
"name": "http_multi_server",
"sha256": "aa6199f908078bb1c5efb8d8638d4ae191aac11b311132c3ef48ce352fb52ef8",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.2.2"
},
"http_parser": {
"dependency": "transitive",
"description": {
"name": "http_parser",
"sha256": "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "4.1.2"
},
"io": {
"dependency": "transitive",
"description": {
"name": "io",
"sha256": "dfd5a80599cf0165756e3181807ed3e77daf6dd4137caaad72d0b7931597650b",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.0.5"
},
"js": {
"dependency": "transitive",
"description": {
"name": "js",
"sha256": "53385261521cc4a0c4658fd0ad07a7d14591cf8fc33abbceae306ddb974888dc",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.7.2"
},
"json_annotation": {
"dependency": "direct main",
"description": {
"name": "json_annotation",
"sha256": "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "4.9.0"
},
"json_serializable": {
"dependency": "direct dev",
"description": {
"name": "json_serializable",
"sha256": "c50ef5fc083d5b5e12eef489503ba3bf5ccc899e487d691584699b4bdefeea8c",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "6.9.5"
},
"lints": {
"dependency": "direct dev",
"description": {
"name": "lints",
"sha256": "a5e2b223cb7c9c8efdc663ef484fdd95bb243bff242ef5b13e26883547fce9a0",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "6.0.0"
},
"logging": {
"dependency": "transitive",
"description": {
"name": "logging",
"sha256": "c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.3.0"
},
"matcher": {
"dependency": "transitive",
"description": {
"name": "matcher",
"sha256": "dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.12.17"
},
"meta": {
"dependency": "transitive",
"description": {
"name": "meta",
"sha256": "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.17.0"
},
"mime": {
"dependency": "transitive",
"description": {
"name": "mime",
"sha256": "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.0.0"
},
"oauth2": {
"dependency": "transitive",
"description": {
"name": "oauth2",
"sha256": "c84470642cbb2bec450ccab2f8520c079cd1ca546a76ffd5c40589e07f4e8bf4",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.0.3"
},
"package_config": {
"dependency": "transitive",
"description": {
"name": "package_config",
"sha256": "f096c55ebb7deb7e384101542bfba8c52696c1b56fca2eb62827989ef2353bbc",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.2.0"
},
"path": {
"dependency": "transitive",
"description": {
"name": "path",
"sha256": "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.9.1"
},
"pointycastle": {
"dependency": "transitive",
"description": {
"name": "pointycastle",
"sha256": "92aa3841d083cc4b0f4709b5c74fd6409a3e6ba833ffc7dc6a8fee096366acf5",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "4.0.0"
},
"pool": {
"dependency": "transitive",
"description": {
"name": "pool",
"sha256": "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.5.1"
},
"pub_api_client": {
"dependency": "transitive",
"description": {
"name": "pub_api_client",
"sha256": "b9c0184ce4a562d8cf2ebd7be235a25aa158b7c01bdef863cccadc5894644e26",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.1.1"
},
"pub_semver": {
"dependency": "transitive",
"description": {
"name": "pub_semver",
"sha256": "5bfcf68ca79ef689f8990d1160781b4bad40a3bd5e5218ad4076ddb7f4081585",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.2.0"
},
"pubspec_parse": {
"dependency": "transitive",
"description": {
"name": "pubspec_parse",
"sha256": "0560ba233314abbed0a48a2956f7f022cce7c3e1e73df540277da7544cad4082",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.5.0"
},
"rfc_6901": {
"dependency": "transitive",
"description": {
"name": "rfc_6901",
"sha256": "df1bbfa3d023009598f19636d6114c6ac1e0b7bb7bf6a260f0e6e6ce91416820",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.2.0"
},
"riverpod": {
"dependency": "direct main",
"description": {
"name": "riverpod",
"sha256": "59062512288d3056b2321804332a13ffdd1bf16df70dcc8e506e411280a72959",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.6.1"
},
"shelf": {
"dependency": "direct main",
"description": {
"name": "shelf",
"sha256": "e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.4.2"
},
"shelf_router": {
"dependency": "direct main",
"description": {
"name": "shelf_router",
"sha256": "f5e5d492440a7fb165fe1e2e1a623f31f734d3370900070b2b1e0d0428d59864",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.1.4"
},
"shelf_web_socket": {
"dependency": "transitive",
"description": {
"name": "shelf_web_socket",
"sha256": "3632775c8e90d6c9712f883e633716432a27758216dfb61bd86a8321c0580925",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.0.0"
},
"source_gen": {
"dependency": "transitive",
"description": {
"name": "source_gen",
"sha256": "35c8150ece9e8c8d263337a265153c3329667640850b9304861faea59fc98f6b",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.0.0"
},
"source_helper": {
"dependency": "transitive",
"description": {
"name": "source_helper",
"sha256": "86d247119aedce8e63f4751bd9626fc9613255935558447569ad42f9f5b48b3c",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.3.5"
},
"source_span": {
"dependency": "transitive",
"description": {
"name": "source_span",
"sha256": "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.10.1"
},
"stack_trace": {
"dependency": "transitive",
"description": {
"name": "stack_trace",
"sha256": "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.12.1"
},
"state_notifier": {
"dependency": "transitive",
"description": {
"name": "state_notifier",
"sha256": "b8677376aa54f2d7c58280d5a007f9e8774f1968d1fb1c096adcb4792fba29bb",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.0.0"
},
"stream_channel": {
"dependency": "transitive",
"description": {
"name": "stream_channel",
"sha256": "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.1.4"
},
"stream_transform": {
"dependency": "transitive",
"description": {
"name": "stream_transform",
"sha256": "ad47125e588cfd37a9a7f86c7d6356dde8dfe89d071d293f80ca9e9273a33871",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.1.1"
},
"string_scanner": {
"dependency": "transitive",
"description": {
"name": "string_scanner",
"sha256": "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.4.1"
},
"super_string": {
"dependency": "transitive",
"description": {
"name": "super_string",
"sha256": "ba41acf9fbb318b3fc0d57c9235779100394d85d83f45ab533615df1f3146ea7",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.0.3"
},
"term_glyph": {
"dependency": "transitive",
"description": {
"name": "term_glyph",
"sha256": "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.2.2"
},
"test_api": {
"dependency": "transitive",
"description": {
"name": "test_api",
"sha256": "522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "0.7.6"
},
"timing": {
"dependency": "transitive",
"description": {
"name": "timing",
"sha256": "62ee18aca144e4a9f29d212f5a4c6a053be252b895ab14b5821996cff4ed90fe",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.0.2"
},
"type_plus": {
"dependency": "transitive",
"description": {
"name": "type_plus",
"sha256": "d5d1019471f0d38b91603adb9b5fd4ce7ab903c879d2fbf1a3f80a630a03fcc9",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "2.1.1"
},
"typed_data": {
"dependency": "transitive",
"description": {
"name": "typed_data",
"sha256": "f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.4.0"
},
"watcher": {
"dependency": "transitive",
"description": {
"name": "watcher",
"sha256": "0b7fd4a0bbc4b92641dbf20adfd7e3fd1398fe17102d94b674234563e110088a",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.1.2"
},
"web": {
"dependency": "transitive",
"description": {
"name": "web",
"sha256": "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.1.1"
},
"web_socket": {
"dependency": "transitive",
"description": {
"name": "web_socket",
"sha256": "34d64019aa8e36bf9842ac014bb5d2f5586ca73df5e4d9bf5c936975cae6982c",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "1.0.1"
},
"web_socket_channel": {
"dependency": "transitive",
"description": {
"name": "web_socket_channel",
"sha256": "d645757fb0f4773d602444000a8131ff5d48c9e47adfe9772652dd1a4f2d45c8",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.0.3"
},
"yaml": {
"dependency": "transitive",
"description": {
"name": "yaml",
"sha256": "b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce",
"url": "https://pub.dev"
},
"source": "hosted",
"version": "3.1.3"
}
},
"sdks": {
"dart": ">=3.8.0 <4.0.0"
}
}

27
pubspec.yaml Normal file
View file

@ -0,0 +1,27 @@
name: nexusbot
description: A minimal OpenID Connect provider backed by Matrix.
version: 1.0.0
publish_to: none
executables:
nexusbot:
environment:
sdk: ^3.8.0
dependencies:
http: ^1.4.0
shelf: ^1.4.0
riverpod: ^2.4.0
freezed_annotation: ^3.0.0
json_annotation: ^4.9.0
shelf_router: ^1.1.4
fast_immutable_collections: ^11.0.4
cli_tools: ^0.6.0
args: ^2.7.0
enough_mail: ^2.1.6
dev_dependencies:
build_runner: ^2.4.6
freezed: ^3.0.6
json_serializable: ^6.7.1
lints: ^6.0.0