2025-04-20 23:50:48 +01:00
# Continuwuity for NixOS
2024-03-21 23:16:20 -04:00
2026-04-10 18:30:36 -04:00
## Nix package
2024-03-21 23:16:20 -04:00
2026-04-10 18:30:36 -04:00
You can get a Nix package for Continuwuity from the following sources:
2024-09-06 19:00:38 -04:00
2026-04-10 18:30:36 -04:00
- Directly from Nixpkgs: `pkgs.matrix-continuwuity`
2026-04-08 16:48:52 -04:00
- Or, using `continuwuity.packages.${system}.default` from:
2026-04-10 18:30:36 -04:00
- The `flake.nix` at the root of the Continuwuity repo, by adding Continuwuity to your flake inputs:
```nix
inputs.continuwuity.url = "git+https://forgejo.ellis.link/continuwuation/continuwuity";
```
- The `default.nix` at the root of the Continuwuity repo
2024-09-06 19:00:38 -04:00
2025-07-14 20:12:01 +01:00
## NixOS module
2024-11-04 14:27:43 +01:00
2026-04-10 18:30:36 -04:00
Continuwuity has an official NixOS module that simplifies configuration and deployment. The module is available in Nixpkgs as `services.matrix-continuwuity`.
2024-11-04 14:27:43 +01:00
2025-07-14 20:12:01 +01:00
Here's a basic example of how to use the module:
2024-11-04 14:27:43 +01:00
2025-07-14 20:12:01 +01:00
```nix
2026-04-10 18:30:36 -04:00
services.matrix-continuwuity = {
enable = true;
settings = {
global = {
server_name = "example.com";
# Continuwuity listens on localhost by default,
# address and port are handled automatically
# You can add any further configuration here, e.g.
# trusted_servers = [ "matrix.org" ];
2025-07-14 20:12:01 +01:00
};
};
2026-04-10 18:30:36 -04:00
};
2025-07-14 20:12:01 +01:00
```
### Available options
The NixOS module provides these configuration options:
- `enable`: Enable the Continuwuity service
- `user`: The user to run Continuwuity as (defaults to "continuwuity")
- `group`: The group to run Continuwuity as (defaults to "continuwuity")
- `extraEnvironment`: Extra environment variables to pass to the Continuwuity server
2026-04-10 18:30:36 -04:00
- `package`: The Continuwuity package to use, defaults to `pkgs.matrix-continuwuity`
- You may want to override this to be from our flake, for faster updates and unstable versions:
```nix
package = inputs.continuwuity.packages.${pkgs.stdenv.hostPlatform.system}.default;
```
- `admin.enable`: Whether to add the `conduwuit` binary to `PATH` for administration (enabled by default)
- `settings`: The Continuwuity configuration
2025-07-14 20:12:01 +01:00
2025-11-15 20:25:54 +00:00
Use the `settings` option to configure Continuwuity itself. See the [example configuration file](../reference/config.mdx) for all available options.
2024-03-21 23:16:20 -04:00
2026-04-10 18:30:36 -04:00
Settings are automatically translated from Nix to TOML. For example, the following line of Nix:
2024-11-20 16:29:42 +01:00
```nix
2026-04-10 18:30:36 -04:00
settings.global.well_known.client = "https://matrix.example.com";
2024-11-20 16:29:42 +01:00
```
2024-09-28 21:55:02 -04:00
2026-04-10 18:30:36 -04:00
Would become this equivalent TOML configuration:
2025-07-14 20:12:01 +01:00
2026-04-10 18:30:36 -04:00
```toml
[global.well_known]
client = "https://matrix.example.com"
```
2025-07-14 20:12:01 +01:00
## Reverse proxy configuration
2026-04-10 18:30:36 -04:00
You'll need to set up a reverse proxy (like NGINX or Caddy) to expose Continuwuity to the internet. You can configure your reverse proxy using NixOS options (e.g. `services.caddy`).
See the [reverse proxy setup guide](./generic.mdx#setting-up-the-reverse-proxy) for information on correct reverse proxy configuration.