Add initial deployment configuration and setup instructions

Introduced a new example-krops.nix file for deployment configuration, providing a template for machine-specific setups. Updated the .gitignore to include krops.nix, ensuring user-specific configurations are not tracked. Expanded the DEPLOYMENT-GUIDE.md with detailed initial setup instructions, including steps for creating and customizing krops.nix and machine configurations, enhancing the onboarding process for new users.
This commit is contained in:
padreug 2025-10-12 08:25:10 +02:00
parent d794cf4394
commit 2229717860
3 changed files with 124 additions and 0 deletions

View file

@ -7,6 +7,43 @@ This setup builds the web-app **locally** with machine-specific configuration, t
- Machine-specific `.env` files
- Machine-specific images in the `public` folder
## Initial Setup
When you first clone this repository, you need to set up your local configuration:
### 1. Create your krops.nix
```bash
# Copy the example template
cp example-krops.nix krops.nix
```
### 2. Create your first machine configuration
```bash
# Copy the example machine template
cp -r config/machines/example-machine config/machines/my-machine
# Edit the configuration
# - Change the domain in configuration.nix
# - Add your hardware-configuration.nix (from nixos-generate-config)
```
### 3. Update krops.nix
Edit `krops.nix` and:
- Replace `example-machine` with your machine name
- Update the SSH target (`root@your-host`)
- Add to the `inherit` list and `all` script
### 4. Deploy!
```bash
nix-build ./krops.nix -A my-machine && ./result
```
**Note:** Your `krops.nix` and machine configs in `config/machines/*` are gitignored. You can safely pull updates without overwriting your local configuration.
## Structure
```