MatthewCroughan / nixblitz

NixBlitz - Using Nix to implement RaspiBlitz with NixOS as the base
6 stars 6 forks source link

Can't rebuild, and also can't find configuration.nix #2

Open chrisguida opened 1 year ago

chrisguida commented 1 year ago

Just installed this, looks cool! Just trying to orient myself... where's the configuration.nix file? It's not in /etc/nixos/configuration.nix...

Also when i run nixos-rebuild switch I get these errors, what's the fix?

[root@lnblitz:/var/lib/bitcoind]# nixos-rebuild switch 
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos' does not exist, ignoring
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
error: file 'nixpkgs/nixos' was not found in the Nix search path (add it using $NIX_PATH or -I)

       at «string»:1:13:

            1| with import <nixpkgs/nixos> {}; config.system.build.nixos-rebuild
             |             ^
(use '--show-trace' to show detailed location information)
building Nix...
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos' does not exist, ignoring
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
error: file 'nixpkgs/nixos' was not found in the Nix search path (add it using $NIX_PATH or -I)
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos' does not exist, ignoring
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
error: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I)
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos' does not exist, ignoring
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
error: file 'nixpkgs/nixos/modules/installer/tools/nix-fallback-paths.nix' was not found in the Nix search path (add it using $NIX_PATH or -I)
/tmp/nixos-rebuild.MKxGuw/nix
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos' does not exist, ignoring
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
error: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I)
building the system configuration...
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos' does not exist, ignoring
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
error: file 'nixpkgs/nixos' was not found in the Nix search path (add it using $NIX_PATH or -I)
chrisguida commented 1 year ago

I want to be able to either change bitcoind's datadir to my external ssd, or enable pruning. The blockchain is gonna fill up the sd card!

MatthewCroughan commented 1 year ago

Simply clone this repo, and modify the configuration, nixos-rebuild switch --flake .#pi. This repo is nothing more than a template at this time.

chrisguida commented 1 year ago

Apologies, I'm a bit of a noob at nix...

$ nixos-rebuild switch --flake .#pi
path '/etc/nixos' does not contain a 'flake.nix', searching up
error: could not find a flake.nix file

what flake am i supposed to be editing? i'm hoping you don't mean that i need to rebuild the .img?

chrisguida commented 1 year ago

Ahh, I'm dumb, you mean inside the git repo. Looks like that's working, thanks!!