Nix support for Financier (https://github.com/financier-io/financier)
Find a file
2022-06-10 12:57:39 +02:00
.gitignore Use nix flake functionality for development 2022-04-08 02:23:53 +02:00
flake.lock Update flakes 2022-06-10 12:57:39 +02:00
flake.nix Use the upstream version of financier 2022-06-10 12:30:13 +02:00
LICENSE Add LICENSE 2020-09-10 16:23:09 +00:00
module.nix Remove overlay 2022-06-09 15:03:38 +02:00
README.markdown Expand Readme 2022-06-09 15:46:07 +02:00

Nix support for financier

This repository contains files for building financier with the Nix package manager. We rely on the Flakes feature of Nix. Make sure you have Flakes enabled before you continue.

Module

There is a module (available as flake output nixosModule) that you can use in your NixOS configuration. See module.nix for the available options. This is intended to be the primary way how to use this flake in your configurations.

Building the package

First, you can (optionally) update the necessary Nix files:

nix develop --command bash generate.sh

Afterwards, the distribution for financier can be built:

nix build

Directory result will contain the built distribution which can be served from a web server.

Questions and Answers

Why no overlay?

There used to be an overlay for the distribution package. But overlays have the disadvantage (in this case) that they can be applied to any version of Nixpkgs. But the package, as it is now, cannot be built with just any version of Nixpkgs. Updates of Nixpkgs in your configuration can break the package and thus your configuration.

For example, this has happened in May 2022 when Node 12 was marked as insecure (because it is at the end of its life). But at that point in time, Node 12 was still used for building our package. The result was that the package build was broken and with it all configurations that use our module.

Since then, we always use a pinned version of Nixpkgs to build the package regardless in which configuation the module is used. This has the downside that we will miss potential security updates. On the other hand, we only build a static website which is very unlikely to have any serious security issues.