No description
Find a file
padreug 6febf28955 Initial commit: krops-lamassu deployment template
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
2026-01-11 23:57:22 +01:00
docs Initial commit: krops-lamassu deployment template 2026-01-11 23:57:22 +01:00
example Initial commit: krops-lamassu deployment template 2026-01-11 23:57:22 +01:00
secrets Initial commit: krops-lamassu deployment template 2026-01-11 23:57:22 +01:00
.gitignore Initial commit: krops-lamassu deployment template 2026-01-11 23:57:22 +01:00
deploy.sh Initial commit: krops-lamassu deployment template 2026-01-11 23:57:22 +01:00
README.md Initial commit: krops-lamassu deployment template 2026-01-11 23:57:22 +01:00
shell.nix Initial commit: krops-lamassu deployment template 2026-01-11 23:57:22 +01:00

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

  1. Clone this repository
  2. Copy the example files:
    cp example/krops.nix ./krops.nix
    cp -r example/config ./config
    
  3. Edit krops.nix to set your deployment target
  4. Copy hardware config from target: scp root@node:/etc/nixos/hardware-configuration.nix config/
  5. Edit config/configuration.nix to configure services
  6. 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:

  1. Edit the VM section in krops.nix and replace 127.0.0.1 with your host's IP (e.g., 192.168.1.50)
  2. 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