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:

Here's a snippet you can use to override the default CLN package version to get the most up to date version.

1services.clightning = { 2 enable = true; 3 package = pkgs.clightning.overrideAttrs ( 4 orig: 5 let version = "v23.02rc3"; in 6 { 7 version = version; 8 src = pkgs.fetchFromGitHub { 9 owner = "ElementsProject"; 10 repo = "lightning"; 11 rev = "${version}"; 12 fetchSubmodules = true; 13 sha256 = "sha256-xGttepiu6ds9+kUhUX+WavUs1yJ9V461SgMv+mWMzcE="; 14 }; 15 configureFlags = [ "--enable-developer" "--disable-valgrind" "--enable-experimental-features" ]; 16 makeFlags = [ "VERSION=${version}" ]; 17 }); 18
related

I'm no linux pro, but I just switched to nixos myself and am thinking about running a node. I have to admit nixos confused the hell out of me for two weeks. Do you know a source for a good sample configuration.nix file? I feel like I modified mine so much I need to start over.

went ahead and put mine up here; it uses flakes, which i'm still getting comfy with

https://gist.github.com/niftynei/8aeef52ac40648f744d506bd1b9cdfa0

Thanks. Flakes, huh? I have to crawl before I can walk!

also fwiw working on getting some nix workshops put together for bitcoin++ in Austin, hoping to have some good how-tos to feature there soon!

That sounds great.

115 sats \ 0 replies \ @chapped 4 Mar

My next node is going to be a Nuc with mirrored SATA M.2 drives using ZFS using NixOS. The documentation at OpenZFS is fantastic for setting up your own NixOS install on ZFS for the base filesystem. I'm still deciding if I'll do a immutable filesystem or not.

https://openzfs.github.io/openzfs-docs/Getting%20Started/NixOS/Root%20on%20ZFS.html

I love using ZFS for the auto snapshots in case any data needs to be recovered and auto scrubs for warning you in advance if a drive is failing.

If you are keeping BTC on the node or looking up addresses, don't forget about full disk encryption in case of theft. There is documentation of full disk encryption in the ZFS install guide and a way to unlock the system remotely over Tor in another guide.

https://nixos.wiki/wiki/Remote_LUKS_Unlocking

wen Guix

Thanks for this info! Yes, NixOS is great! I switched over from Arch several months ago.

Is your clightning container connected to the stable or unstable branch?

Once I got the configuration squared away, I really started to like the motivation behind nix-bitcoin.

I haven't really strayed too far from the basic set up, and the prospect of building my own packages/modules for nix-bitcoin is still pretty intimidating.

Compared to running a raspiblitz, I like nix-bitcoin much better, if for nothing else than the infinitely saner declarative upgrade process.

yeah it's great! we're going to have at least one talk on nix at bitcoin++ in Austin this April, hoping it'll be on how to package things up (unsure about what speaker wants to cover tho)

100 sats \ 2 replies \ @lunanto 1 Mar

Is the Nixos Machine like Raspberry?

it's basically a declarative way of writing up machine configuration, including every package that you download/install

as others have mentioned the startup/learning curve is really steep but once you've got a working machine config you've basically documented how to completely setup your machine -- makes it really easy to try new things and roll back!

It is similar to a node-in-a-box distribution, like raspiblitz or umbrel in that you can just "turn on" features and know that they are well-tested and play well with other features. But it's a steeper learning curve to setting up the machine and configuring the features.

I tried to do this and got zero support so I gave up

To tell the truth, the Matrix channel has been extremely helpful. I've never been turned away for even the most basic questions

https://matrix.to/#/!ZjqobnUcReTiEzLXVz:nixbitcoin.org?via=nixbitcoin.org&via=matrix.org&via=fabric.pub

it's pretty hard to get going, and the tutorials etc were all over the place -- @nothingmuch had to walk me through getting mine set up :3

Yeah I think if I had time I could figure it out but fiat mining takes so much time.

deleted by author

You could give the Sovran Pro a try https://sovransystems.com. Works out of the box!

Solid code

Run, node, run!

100 sats \ 0 replies \ @Lumor 28 Feb

Nix sure is promising with its declarative approach.