Compare commits

..
396 changed files with 4269 additions and 17169 deletions

View file

@ -1,24 +0,0 @@
name: "Bump the Windows build's libmpv"
on:
schedule:
- cron: "0 6 * * 1"
workflow_dispatch:
jobs:
bump-libmpv:
runs-on: ["small", "debian-13-x86_64"]
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Lix GHA Installer Action
uses: samueldr/lix-gha-installer-action@v2026-02-22
with:
extra_nix_config: experimental-features = nix-command flakes flake-self-attrs
- name: Open a PR if there's a newer libmpv build
env:
TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: nix run .#bump-libmpv

View file

@ -1,28 +0,0 @@
name: "End-to-end tests"
on:
schedule:
- cron: "0 6 * * 1"
pull_request:
workflow_dispatch:
jobs:
e2e:
runs-on: ["large-mem", "debian-13-x86_64"]
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
submodules: recursive
- name: Lix GHA Installer Action
uses: samueldr/lix-gha-installer-action@v2026-02-22
with:
extra_nix_config: experimental-features = nix-command flakes flake-self-attrs
- name: Generate code
run: nix develop --command bash -c "flutter pub get && dart scripts/generate.dart && flutter pub run build_runner build"
- name: Run end-to-end tests
run: nix run .#e2e-headless

View file

@ -15,7 +15,6 @@ jobs:
uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
- name: Lix GHA Installer Action
uses: samueldr/lix-gha-installer-action@v2026-02-22
@ -27,30 +26,8 @@ jobs:
env:
KEYSTORE_CONTENT: ${{ secrets.KEYSTORE_CONTENT }}
# The NDK's path ends up in the native libraries' build IDs, so put it where F-Droid has it.
# It's copied rather than linked, as clang finds its headers from its resolved location.
- name: Set up Android SDK
run: |
ndk=$(nix develop --command printenv ANDROID_NDK_HOME)
sudo mkdir -p /opt/android-sdk/ndk
sudo chown -R "$USER" /opt/android-sdk
for entry in "${ndk%/ndk/*}"/*; do
[[ $entry == */ndk ]] || ln -s "$entry" /opt/android-sdk/
done
cp -rL "$ndk" /opt/android-sdk/ndk/
- name: Build app
run: |
export PUB_CACHE=$PWD/.pub-cache
export GOTOOLCHAIN=go$(sed -n -E 's/^toolchain go([0-9.]+)$/\1/p' gomuks/go.mod)
nix develop --command bash -c '
set -e
export ANDROID_HOME=/opt/android-sdk ANDROID_SDK_ROOT=/opt/android-sdk ANDROID_NDK_HOME=/opt/android-sdk/ndk/${ANDROID_NDK_HOME##*/}
flutter pub get --enforce-lockfile
bash scripts/build_avif_native.sh
dart scripts/generate.dart
flutter pub run build_runner build
flutter build apk --target-platform android-arm64 --split-per-abi --dart-define=GIT_COMMIT=$GITHUB_SHA'
run: nix develop --command bash -c "flutter pub get && dart scripts/generate.dart && flutter pub run build_runner build && flutter build apk --target-platform android-arm64 --split-per-abi --dart-define=GIT_COMMIT=${{ github.sha }}"
env:
KEYSTORE_PATH: ../../keystore.jks
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}

View file

@ -19,7 +19,7 @@ jobs:
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version-file: pubspec.yaml
flutter-version: 3.47.4
- name: Set up Go
uses: actions/setup-go@v6

View file

@ -19,7 +19,7 @@ jobs:
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version-file: pubspec.yaml
flutter-version: 3.47.4
- name: Set up Go
uses: actions/setup-go@v6

View file

@ -19,7 +19,7 @@ jobs:
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version-file: pubspec.yaml
flutter-version: 3.47.4
- name: Set up Go
uses: actions/setup-go@v6
@ -36,7 +36,7 @@ jobs:
- name: Go build
run: |
cd gomuks/pkg/ffi
go build -tags sqlite_fts5 -o ../../../libgomuks.dll -buildmode=c-shared
go build -tags goolm,sqlite_fts5 -o ../../../libgomuks.dll -buildmode=c-shared
- name: Build with Flutter
run: |
@ -45,17 +45,6 @@ jobs:
flutter pub run build_runner build
flutter build windows --dart-define=GIT_COMMIT=${{ github.sha }}
# better_player plays videos with libmpv, but doesn't bundle it
- name: Download libmpv
shell: powershell
run: |
$archive = "$env:RUNNER_TEMP\mpv.7z"
Invoke-WebRequest "https://github.com/shinchiro/mpv-winbuild-cmake/releases/download/20261111/mpv-dev-x86_64-20261111-git-bcde6b93cc.7z" -OutFile $archive
if ((Get-FileHash $archive -Algorithm SHA256).Hash -ne "273c079b11ea5575822f972756f4c9a71149a5c10130353abeb8586738938452") {
throw "libmpv checksum mismatch"
}
7z e $archive libmpv-2.dll -obuild/windows/x64/runner/Release
- name: Copy MinGW runtime DLLs
shell: msys2 {0}
run: |

1
.gitmodules vendored
View file

@ -1,4 +1,3 @@
[submodule "gomuks"]
path = gomuks
url = https://github.com/gomuks/gomuks
branch = quad/nexus

View file

@ -12,7 +12,6 @@
"prefs",
"recents",
"unban",
"underride",
"unifiedpush",
"unredact",
"webpush"

View file

@ -12,16 +12,6 @@ You can run the following command to update the Gomuks submodule:
git submodule update --remote
```
## Releasing
To make a release, run the following command with the new version, either `X.Y.Z` or a pre-release like `X.Y.Z-alpha1`:
```sh
scripts/release.sh 1.2.0
```
This sets the version in `pubspec.yaml` (along with the Android version code), the Windows installer, the AppStream metainfo and the README, then commits and tags it. Push it with the command it prints, then attach the artifacts from the tag's CI run to the release.
## Code Style
See [Effective Dart: Style](https://dart.dev/effective-dart/style) for general rules. There are some extra rules detailed below:

View file

@ -6,9 +6,9 @@ A simple and user-friendly Matrix client made with Flutter and a Gomuks backend.
## Screenshots
| Dark Mode | Light Mode |
| :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------: |
| ![Screenshot of Nexus Client in dark mode, showing users talking, with a sidebar showing rooms and spaces, and another sidebar showing members](./assets/screenshots/desktop-dark.png) | ![The same screenshot as above, but in light mode](./assets/screenshots/desktop-light.png) |
| Dark Mode | Light Mode |
| :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------: |
| ![Screenshot of Nexus Client in dark mode, showing users talking, with a sidebar showing rooms and spaces, and another sidebar showing members](./assets/screenshotDark.png) | ![The same screenshot as above, but in light mode](./assets/screenshotLight.png) |
## Try it out
@ -49,7 +49,7 @@ nexus = {
This tracks the latest commit on `main`. To stay on a release instead, pin the input to its tag:
```nix
url = "git+https://git.federated.nexus/Nexus/nexus?ref=refs/tags/v1.1.3";
url = "git+https://git.federated.nexus/Nexus/nexus?ref=refs/tags/v1.0.0";
```
Then import the module and enable it in your NixOS configuration:
@ -75,7 +75,7 @@ This installs Nexus system-wide. With `enableNotifications`, it also installs KU
#### Linux
- On NixOS: Either use direnv and `direnv allow`, or `nix develop`
- On other distros: Install Flutter, Go, Git, Libclang, MPV, GStreamer (with its base, good and libav plugins), and Glibc. Do not use any Snap packages, they cause various compilation issues.
- On other distros: Install Flutter, Go, Git, Libclang, Libass, MPV, and Glibc. Do not use any Snap packages, they cause various compilation issues.
#### Windows
@ -83,11 +83,12 @@ You will need:
- Flutter
- Git
- Libass
- MPV
- Go
- Visual Studio 2022 (Desktop development with C++)
- [MSYS2/MinGW-w64 GCC](https://www.msys2.org/) (for CGO)
- [LLVM/Clang + libclang](https://clang.llvm.org/get_started.html) (for `ffigen`)
- `libmpv-2.dll`, for playing videos, next to `nexus.exe` (CI uses a build from [mpv-winbuild-cmake](https://github.com/shinchiro/mpv-winbuild-cmake/releases))
On Windows, make sure these are available in your shell `PATH`:
@ -156,6 +157,3 @@ Join the [Nexus Client Matrix room](https://matrix.to/#/#nexus:federated.nexus)
Thank you Hylke Bons (https://planetpeanut.studio) for making the amazing icon for Nexus!
Thank you Tulir Asokan for making [Gomuks](https://github.com/gomuks/gomuks), and helping us integrate it into Nexus!
Thank you [Feline Build Services](https://felinebuildservices.org/) for providing CI for the Nexus Forgejo repo!
The Nexus icon, including its source files in `assets/` and the platform app icons generated from them, is © Hylke Bons. The screenshots are © Henry Hiles. Both are licensed under [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/).

View file

@ -16,7 +16,7 @@ if (keystorePropertiesFile.exists()) {
android {
namespace = "nexus.federated.nexus"
compileSdk = 37
compileSdk = 36
ndkVersion = flutter.ndkVersion
compileOptions {
@ -57,14 +57,9 @@ android {
}
}
dependenciesInfo {
includeInApk = false
}
buildTypes {
release {
// Unsigned without a keystore, e.g. for F-Droid, which signs it itself
signingConfig = signingConfigs.getByName("release").takeIf { it.storeFile != null }
signingConfig = signingConfigs.getByName("release")
}
debug {

View file

@ -1,13 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET" />
<!-- The location plugin only needs these for background location, which Nexus doesn't use -->
<uses-permission
android:name="android.permission.FOREGROUND_SERVICE"
tools:node="remove" />
<uses-permission
android:name="android.permission.FOREGROUND_SERVICE_LOCATION"
tools:node="remove" />
<uses-permission
android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="32" />
@ -26,7 +18,7 @@
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTask"
android:launchMode="singleInstance"
android:taskAffinity=""
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
@ -40,13 +32,6 @@
<data android:scheme="nexus.federated.nexus" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="matrix" />
</intent-filter>
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"

View file

@ -35,6 +35,6 @@ class MainActivity: FlutterActivity() {
// Posted so it runs after Flutter has applied any insets it deferred.
private fun reapplyInsets() {
val view = findViewById<View>(FLUTTER_VIEW_ID) ?: return
view.post { view.requestApplyInsets() }
view.post { view.rootWindowInsets?.let(view::onApplyWindowInsets) }
}
}

View file

@ -5,5 +5,3 @@ android.enableJetifier=true
android.builtInKotlin=false
# This newDsl flag was added automatically by Flutter migrator
android.newDsl=false
# Leaves proprietary Google Play services out of the location plugin
location.playServices=false

View file

@ -24,15 +24,3 @@ plugins {
}
include(":app")
// Flutter's plugin loader includes dev dependency plugins like integration_test as projects even in
// release builds (where they're never linked in). integration_test lives in the Flutter SDK, which
// is read-only under Nix, and Gradle 9+ refuses to configure a project whose directory isn't writable.
findProject(":integration_test")?.let { project ->
if (!project.projectDir.canWrite()) {
val copy = file("../build/integration_test_android")
copy.deleteRecursively()
project.projectDir.copyRecursively(copy)
project.projectDir = copy
}
}

View file

@ -1,150 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="100mm"
height="100mm"
viewBox="0 0 100 100"
version="1.1"
id="svg1"
xml:space="preserve"
inkscape:version="1.4.2 (ebf0e940d0, 2025-05-08)"
sodipodi:docname="icon.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
id="namedview1"
pagecolor="#505050"
bordercolor="#eeeeee"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#505050"
inkscape:document-units="mm"
inkscape:zoom="1.0847363"
inkscape:cx="57.61769"
inkscape:cy="214.33781"
inkscape:window-width="1896"
inkscape:window-height="963"
inkscape:window-x="35"
inkscape:window-y="32"
inkscape:window-maximized="0"
inkscape:current-layer="layer1" /><defs
id="defs1"><linearGradient
id="linearGradient10"
inkscape:collect="always"><stop
style="stop-color:#c7a312;stop-opacity:1;"
offset="0"
id="stop10" /><stop
style="stop-color:#26a0b3;stop-opacity:1;"
offset="1"
id="stop11" /></linearGradient><linearGradient
inkscape:collect="always"
xlink:href="#linearGradient10"
id="linearGradient11"
x1="20.031296"
y1="32.697563"
x2="90.709213"
y2="66.3423"
gradientUnits="userSpaceOnUse" /></defs><g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"><rect
style="fill:url(#linearGradient11);fill-opacity:1;stroke:none;stroke-width:7.99999;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
id="rect10"
width="100"
height="100"
x="0"
y="0"
ry="28.294127" /><path
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:8;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
d="M 19.377906,68.106953 80.937684,32.43771"
id="path10" /><path
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:8;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
d="m 19.044488,32.469148 61.61782,35.569625"
id="path9" /><path
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:8;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
d="M 50,85.574911 V 14.425087"
id="path8" /><circle
style="fill:none;stroke:#ffffff;stroke-width:7.11498;stroke-linecap:round;stroke-linejoin:round"
id="path1"
cx="50"
cy="50"
r="35.574913" /><circle
style="fill:#09bd05;stroke:#ffffff;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;fill-opacity:1;stroke-dasharray:none"
id="path2"
cx="50"
cy="84.604881"
r="8.2508707" /><circle
style="fill:#fe1e24;stroke:#ffffff;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;fill-opacity:1;stroke-dasharray:none"
id="circle2"
cx="50"
cy="15.395123"
r="8.2508707" /><circle
style="fill:#fe941d;stroke:#ffffff;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;fill-opacity:1;stroke-dasharray:none"
id="circle3"
cx="-68.30127"
cy="52.906147"
r="8.2508707"
transform="rotate(-120)" /><circle
style="fill:#001996;stroke:#ffffff;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;fill-opacity:1;stroke-dasharray:none"
id="circle4"
cx="-68.30127"
cy="-16.30361"
r="8.2508707"
transform="rotate(-120)" /><circle
style="fill:#ffff04;stroke:#ffffff;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;fill-opacity:1;stroke-dasharray:none"
id="circle5"
cx="-18.301271"
cy="102.90615"
r="8.2508707"
transform="rotate(-60)" /><circle
style="fill:#770287;stroke:#ffffff;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;fill-opacity:1;stroke-dasharray:none"
id="circle6"
cx="-18.301271"
cy="33.696392"
r="8.2508707"
transform="rotate(-60)" /><circle
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:6.75;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none"
id="path7"
cx="50"
cy="50"
r="9.7918472" /><g
inkscape:label="Layer 1"
id="layer1-3"
transform="matrix(0.08246781,0,0,0.08246781,38.828362,38.828362)"
style="stroke:#ffffff"><text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:900;font-stretch:normal;font-size:96.3615px;line-height:0;font-family:'Noto Serif';-inkscape-font-specification:'Noto Serif, Heavy';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:0;stroke-dasharray:none;stroke-opacity:1"
x="-305.64749"
y="194.14493"
id="text2819"><tspan
sodipodi:role="line"
id="tspan2817"
style="stroke:#ffffff;stroke-width:0"
x="-305.64749"
y="194.14493" /></text><circle
style="fill:#354b5f;fill-opacity:1;stroke:#ffffff;stroke-width:0;stroke-dasharray:none;stroke-opacity:1"
id="path342"
cx="135.46666"
cy="135.46666"
r="135.46666" /><text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:900;font-stretch:normal;font-size:96.3615px;line-height:0;font-family:'Noto Serif';-inkscape-font-specification:'Noto Serif, Heavy';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:0;stroke-dasharray:none;stroke-opacity:1"
x="-305.64749"
y="194.14493"
id="text2819-3"><tspan
sodipodi:role="line"
id="tspan2817-5"
style="stroke:#ffffff;stroke-width:0"
x="-305.64749"
y="194.14493" /></text><g
aria-label="❯"
id="text2827-6"
style="font-size:132.452px;line-height:0;font-family:PowerlineSymbols;-inkscape-font-specification:'PowerlineSymbols, Normal';text-align:end;text-anchor:end;fill:#4e94e4;fill-opacity:1;stroke:#ffffff;stroke-width:0"><path
d="M 95.096912,209.8167 143.88912,135.46666 95.096912,61.116629 h 32.818568 l 47.92093,74.350031 -47.92093,74.35004 z"
id="path2883-2"
style="fill:#4e94e4;fill-opacity:1;stroke:#ffffff;stroke-width:0" /></g></g></g></svg>

Before

Width:  |  Height:  |  Size: 6.8 KiB

View file

@ -1,11 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 520 520">
<path d="M13.7,11.9v496.2h35.7V520H0V0h49.4v11.9H13.7z"/>
<path d="M166.3,169.2v25.1h0.7c6.7-9.6,14.8-17,24.2-22.2c9.4-5.3,20.3-7.9,32.5-7.9c11.7,0,22.4,2.3,32.1,6.8
c9.7,4.5,17,12.6,22.1,24c5.5-8.1,13-15.3,22.4-21.5c9.4-6.2,20.6-9.3,33.5-9.3c9.8,0,18.9,1.2,27.3,3.6c8.4,2.4,15.5,6.2,21.5,11.5
c6,5.3,10.6,12.1,14,20.6c3.3,8.5,5,18.7,5,30.7v124.1h-50.9V249.6c0-6.2-0.2-12.1-0.7-17.6c-0.5-5.5-1.8-10.3-3.9-14.3
c-2.2-4.1-5.3-7.3-9.5-9.7c-4.2-2.4-9.9-3.6-17-3.6c-7.2,0-13,1.4-17.4,4.1c-4.4,2.8-7.9,6.3-10.4,10.8c-2.5,4.4-4.2,9.4-5,15.1
c-0.8,5.6-1.3,11.3-1.3,17v103.3h-50.9v-104c0-5.5-0.1-10.9-0.4-16.3c-0.2-5.4-1.3-10.3-3.1-14.9c-1.8-4.5-4.8-8.2-9-10.9
c-4.2-2.7-10.3-4.1-18.5-4.1c-2.4,0-5.6,0.5-9.5,1.6c-3.9,1.1-7.8,3.1-11.5,6.1c-3.7,3-6.9,7.3-9.5,12.9c-2.6,5.6-3.9,13-3.9,22.1
v107.6h-50.9V169.2H166.3z"/>
<path d="M506.3,508.1V11.9h-35.7V0H520v520h-49.4v-11.9H506.3z"/>
</svg>

Before

Width:  |  Height:  |  Size: 958 B

BIN
assets/screenshotDark.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 KiB

BIN
assets/screenshotLight.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

Some files were not shown because too many files have changed in this diff Show more