Add krops multi-machine deployment configuration for nix-25.05
Sets up deployment infrastructure for two NixOS machines using krops, with individual and combined deployment targets. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
commit
c6d226778d
1 changed files with 42 additions and 0 deletions
42
README.md
Normal file
42
README.md
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
# Krops Multi-Machine Deployment
|
||||
|
||||
This project deploys NixOS configurations to two machines using krops with nix-25.05.
|
||||
|
||||
## Structure
|
||||
|
||||
```
|
||||
.
|
||||
├── krops.nix # Main deployment configuration
|
||||
└── config/
|
||||
├── machine1/
|
||||
│ └── configuration.nix # Machine 1 NixOS config
|
||||
└── machine2/
|
||||
└── configuration.nix # Machine 2 NixOS config
|
||||
```
|
||||
|
||||
## Setup
|
||||
|
||||
1. Update target hostnames/IPs in `krops.nix`:
|
||||
- Change `root@machine1.example.com` to your machine1 address
|
||||
- Change `root@machine2.example.com` to your machine2 address
|
||||
|
||||
2. Customize NixOS configurations in `config/machine1/configuration.nix` and `config/machine2/configuration.nix`
|
||||
|
||||
## Usage
|
||||
|
||||
Deploy to a single machine:
|
||||
```bash
|
||||
nix-build ./krops.nix -A machine1 && ./result
|
||||
nix-build ./krops.nix -A machine2 && ./result
|
||||
```
|
||||
|
||||
Deploy to all machines:
|
||||
```bash
|
||||
nix-build ./krops.nix -A all && ./result
|
||||
```
|
||||
|
||||
## Requirements
|
||||
|
||||
- SSH access to target machines as root
|
||||
- Target machines running NixOS
|
||||
- nix installed on the deployment machine
|
||||
Loading…
Add table
Add a link
Reference in a new issue