1.2 KiB
1.2 KiB
Nix Deployment
This repo ships a Nix flake with:
nix runsupport (runsflynn)nix developdev shell (Node 22 + pnpm)- A package that builds
dist/and preservesdist/gateway/uiadjacency - An optional NixOS module (
services.flynn)
Quick Start
# Dev shell
nix develop
# Run (prints CLI help)
nix run . -- --help
# Build package
nix build .#
First Build: Update pnpmDepsHash
The Nix package uses buildPnpmPackage, which requires a fixed dependency hash.
On the first nix build, Nix will fail with a message containing the expected
hash (looks like got: sha256-...). Copy that value into nix/package.nix as
pnpmDepsHash, then rebuild.
NixOS Module
The flake exports nixosModules.flynn.
Example:
{
inputs.flynn.url = "github:will666/flynn";
outputs = { self, nixpkgs, flynn, ... }: {
nixosConfigurations.myHost = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
flynn.nixosModules.flynn
{
services.flynn = {
enable = true;
configFile = "/etc/flynn/config.yaml";
dataDir = "/var/lib/flynn";
};
}
];
};
};
}