Reducing modules to single flake to ensure nix-bitcoin inheritance

This commit is contained in:
jeirmeister 2025-09-12 12:44:38 -07:00
parent ec55daaef6
commit 7de19b46ec
8 changed files with 140 additions and 181 deletions

View file

@ -1,25 +1,37 @@
REMOTE_HOST := "root@10.1.1.163"
# Default command: lists all available just commands
default:
just --list
# Rebuild the local NixOS system using a flake configuration
rebuild:
nixos-rebuild switch --flake .#btc-pay-server --extra-experimental-features 'nix-command flakes'
nixos-rebuild switch --flake .#btc-pay-server
# Build the NixOS system configuration without switching
build:
nix build .#nixosConfigurations.btc-pay-server.config.system.build.toplevel
deploy:
nixos-rebuild switch --flake .#btc-pay-server --target-host {{REMOTE_HOST}} --option experimental-features "nix-command flakes"
# Deploy (rebuild) the NixOS system on the remote host
# Usage: just deploy root@10.1.1.163
deploy host:
nixos-rebuild switch --fast --flake .#btc-pay-server --target-host {{host}} --build-host {{host}} --use-remote-sudo
status:
ssh {{REMOTE_HOST}} "systemctl status bitcoind btcpayserver"
# Check the status of bitcoind and btcpayserver services on the remote host
# Usage: just status root@10.1.1.163
status host:
ssh {{host}} "systemctl status bitcoind btcpayserver"
# Encrypt the secrets.yaml file in place using sops
encrypt-secrets:
sops -e -i secrets.yaml
# Open the secrets.yaml file for editing with sops
edit-secrets:
sops secrets.yaml
# Open a developer shell with the nix flake's environment
shell:
nix develop
# Open a PostgreSQL client to the local nbxplorer database
psql:
psql -h localhost -U nbxplorer -d nbxplorer