Fishnet is how Lichess runs Stockfish for server-side analysis of games. Anyone can contribute CPU time to this.
This repository contains Nix expressions to configure NixOS to configure and start Fishnet.
Add fishnet-nix to your flake.nix
:
{
inputs = {
fishnet-nix.url = "github:sid-code/fishnet-nix";
# ...
}
outputs = {self, fishnet-nix, ...}@inputs: {
# ...
};
}
Then, in a NixOS module:
{inputs, pkgs, ...}:
{
imports = [inputs.fishnet-nix.nixosModules.x86_64-linux.default];
config = {
services.fishnet = {
enable = true;
keyFile = "<path to your key file>";
cores = 12; # The number of CPU cores to use.
joinEvenIfNoBacklog = false; # Do this if you're on a laptop.
};
};
}