docs(dev): update recent technical documentation

This commit is contained in:
Elian Doran
2025-11-03 22:16:15 +02:00
parent 4a47ff2ea0
commit d9071f2d8e
85 changed files with 1449 additions and 1790 deletions

View File

@@ -0,0 +1,11 @@
# Safe mode
Safe mode is triggered by setting the `TRILIUM_SAFE_MODE` environment variable to a truthy value, usually `1`.
In each artifact there is a `trilium-safe-mode.sh` (or `.bat`) script to enable it.
What it does:
* Disables `customWidget` launcher types in `app/widgets/containers/launcher.js`.
* Disables the running of `mobileStartup` or `frontendStartup` scripts.
* Displays the root note instead of the previously saved session.
* Disables the running of `backendStartup`, `hourly`, `daily` scripts and checks for the hidden subtree.

View File

@@ -0,0 +1,76 @@
# Nix flake
Since TriliumNext 0.94.1, the desktop and server applications can be built using [Nix](https://nixos.org/).
## System requirements
Installation of Nix on Mac or Linux ([download page](https://nixos.org/download/)). About 3-4 gigabytes of additional storage space, for build artifacts.
## Run directly
Using [nix run](https://nix.dev/manual/nix/stable/command-ref/new-cli/nix3-run.html), the desktop app can be started as: `nix run github:TriliumNext/Trilium/v0.95.0`
Running the server requires explicitly specifying the desired package: `nix run github:TriliumNext/Trilium/v0.95.0#server`
Instead of a version (`v0.95.0` above), you can also specify a commit hash (or a branch name). This makes it easy to test development builds.
## Install on NixOS
Add to your `flake.nix`:
```
{
inputs = {
nixpkgs.url = # ...;
trilium-notes = {
url = "github:TriliumNext/Trilium/v0.95.0";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
self,
# ...
trilium-notes,
...
}:
{
nixosConfigurations = {
"nixos" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
];
specialArgs = {
inherit
trilium-notes
;
};
};
};
};
}
```
Add to your `configuration.nix`:
```
{
# ...
trilium-notes,
...
}:
{
# ...
services.trilium-server.package = trilium-notes.packages.x86_64-linux.server;
environment.systemPackages = [
trilium-notes.packages.x86_64-linux.desktop
];
}
```
The flake aims to be compatible with the latest NixOS stable and unstable.

View File

@@ -0,0 +1,2 @@
# Nix flake
This is a clone of a note. Go to its [primary location](../Desktop%20Installation/Nix%20flake.md).