sid-code / fishnet-nix

Nix expressions for Lichess Fishnet

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fishnet-nix

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.

Usage as a flake

FlakeHub

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.
    };
  };
}

About

Nix expressions for Lichess Fishnet


Languages

Language:Nix 100.0%