Really just wanted to start nix-bitcoin fan thread. I recently switched my node over to a nixos machine and was able to get a second node running in a container on it really fast. It wasn't painless but man I'm really enjoying using nixos.
Here's some things I used to get it going:
- nix-bitcoin: https://nixbitcoin.org/
- extra-container: https://github.com/erikarvstedt/extra-container (for managing the 'contained' node)
Here's a snippet you can use to override the default CLN package version to get the most up to date version.
services.clightning = {
enable = true;
package = pkgs.clightning.overrideAttrs (
orig:
let version = "v23.02rc3"; in
{
version = version;
src = pkgs.fetchFromGitHub {
owner = "ElementsProject";
repo = "lightning";
rev = "${version}";
fetchSubmodules = true;
sha256 = "sha256-xGttepiu6ds9+kUhUX+WavUs1yJ9V461SgMv+mWMzcE=";
};
configureFlags = [ "--enable-developer" "--disable-valgrind" "--enable-experimental-features" ];
makeFlags = [ "VERSION=${version}" ];
});