No description
Find a file
2024-04-18 15:32:12 +02:00
nix Add customize volume 2024-04-17 23:48:40 +02:00
.gitignore Initial commit. 2024-04-16 12:11:50 +02:00
config.js Add customize volume 2024-04-17 23:48:40 +02:00
default.nix Add customize volume 2024-04-17 23:48:40 +02:00
deuxfleurs.nix Fix docker.nix 2024-04-18 15:32:12 +02:00
docker-compose.yml Add customize volume 2024-04-17 23:48:40 +02:00
docker.nix Add customize volume 2024-04-17 23:48:40 +02:00
package-lock.json Initial commit. 2024-04-16 12:11:50 +02:00
README.md Update README.md 2024-04-16 12:13:54 +02:00

CryptPad for NixOS with Deuxfleurs flavour

Building

The default.nix file follows the nixpkgs callPackage convention for fetching dependencies, so you need to either:

  • Run nix-build --expr '{ ... }@args: (import <nixpkgs> {}).callPackage ./default.nix args'
  • Do the callPackage from a higher-level directory importing your package

Docker

The docker.nix derives into a Docker image you can load simply by running:

docker load -i $(nix-build docker.nix)

You can then test the built Docker image using the provided docker-compose.yml and config.js files, which are configured to render the instance accessible at http://localhost:3000 with data stored into the _data folder.

Deuxfleurs flavour

The deuxfleurs.nix file derives into two derivations: The CryptPad derivation itself and a Docker image, which can be choose by passing the -A [name] flags to nix-build

For example, to build and load the Deuxfleurs-flavoured CryptPad Docker image, you run:

docker load -i $(nix-build deuxfleurs.nix -A docker)

OnlyOffice integration

Apart for deuxfleurs.nix, both default.nix and docker.nix files build CryptPad with a copy of OnlyOffice pre-built and used by CryptPad, which can result to large Docker image (~2.6GiB)

This behaviour is configurable by passing the --arg withOnlyOffice false flag to nix-build when building them.

Updating the Deuxfleurs pinned nixpkgs

The pinned sources files are generated with the niv tool.

To update the pinned nixpkgs, you simply run the following command:

niv update

To modify the pinned nixpkgs, you can use the niv modify command, for example, to move to nixpkgs-unstable:

niv modify nixpkgs -b nixos-unstable

Quirks

  • The CryptPad package-lock.json is included here because the upstream-provided one appeared to be desync'ed, so a manual lockfile generation was needed