No description
NixOS deployment template for Lamassu Bitcoin ATM server using nix-bitcoin and krops. Features: - Lamassu server with PostgreSQL and auto-generated secrets - TLS certificates (self-signed) - Test VM for local development - Template structure for easy customization |
||
|---|---|---|
| docs | ||
| example | ||
| secrets | ||
| .gitignore | ||
| deploy.sh | ||
| README.md | ||
| shell.nix | ||
krops-lamassu
NixOS deployment template for Lamassu Bitcoin ATM server using nix-bitcoin and krops.
Features
- Lamassu Server - Bitcoin ATM management system
- PostgreSQL - Database with auto-configured credentials
- TLS Certificates - Auto-generated self-signed certs
- Secrets Management - Automatic generation and secure storage
- Test VM - Local testing before production deployment
Quick Start
- Clone this repository
- Copy the example files:
cp example/krops.nix ./krops.nix cp -r example/config ./config - Edit
krops.nixto set your deployment target - Copy hardware config from target:
scp root@node:/etc/nixos/hardware-configuration.nix config/ - Edit
config/configuration.nixto configure services - Deploy:
./deploy.sh
Your krops.nix and config/ are gitignored, so you can pull upstream changes without conflicts.
See docs/install.md for detailed instructions.
Structure
.
├── deploy.sh # Deployment script
├── shell.nix # Development shell
├── docs/
│ └── install.md # Installation guide
├── example/ # Template files (copy to get started)
│ ├── krops.nix # Krops configuration template
│ └── config/
│ ├── configuration.nix # Main NixOS configuration
│ ├── boot.nix # Bootloader config
│ ├── hardware-configuration.nix
│ └── nix-bitcoin-release.nix
├── krops.nix # Your config (gitignored)
├── config/ # Your config (gitignored)
└── secrets/ # Secrets (auto-generated, gitignored)
Usage
# Deploy to target
./deploy.sh
# Test build (no deploy)
./deploy.sh test
# Run test VM with preconfigured settings
./deploy.sh vm
Test VM
Run a local VM to test your configuration before deploying to production:
- Edit the VM section in
krops.nixand replace127.0.0.1with your host's IP (e.g.,192.168.1.50) - Run the VM:
./deploy.sh vm
The VM starts with:
- Lamassu server with auto-generated secrets
- PostgreSQL database configured
- Auto-login to root console
Access the admin UI at https://YOUR-HOST-IP:8443
Useful commands inside the VM:
# Watch build progress (first run takes several minutes)
journalctl -fu lamassu-build
# Check service status
systemctl status lamassu-server lamassu-admin-server
# View generated secrets
ls -la /secrets/
To exit the VM, run shutdown now in the VM console.
Development Shell
Enter the nix-bitcoin development shell:
nix-shell
Requirements
- Nix installed on deployment machine
- SSH access to target as root
- NixOS on target machine
Documentation
License
MIT