aux-config/modules/nixos/suites/senfnvp/README.md
kB01 4c88455552
All checks were successful
/ Check Nix Flake (push) Successful in 2m1s
Added senfnvp Stack (development)
2025-05-07 00:34:49 +02:00

39 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Senfnvp Stack
The Senfnvp Stack contains Web Infra-structure.
## Notes
``` nix
senfnvp = {
enable = true;
hostname = "senfnvp.kb-one.de";
# Defaults
proxy.enable = true;
website.enable = true;
forgejo.enable = true;
forgejo.initializeDatabase = false; # Only use once!
forgejo.enableFail2Ban = true;
keycloak.enable = true;
keycloak.initializeDatabase = false; # Only use once!
docker-compose.enable = true; # Configuration for Docker-Compose support for Mailcow
};
```
### The Database
The Database Server is enabled when when you enable the Stack itself.
When you Activate a Service you might want to Edit the File at `./database/init-servicename.template.sql`. If you have a Database-Dump, place it there with the Naming-Sheme `./database/init-servicename.sql`. When creating a new Setup you can just run `cp init-servicename.template.sql init-servicename.sql` to use the template. The template only creates the Database, User and Password and lets it to the Service create its Tables.
Basically the order is like this:
- Create Secrets `sops ./secrets.yaml`
- Apply Template `cp ./database/init-forgejo.template.sql ./database/init-forgejo.sql`
- Initialize ´forgejo.enable = true; forgejo.initializeDatabase = true;`
- Apply config `nixos-rebuild switch --flake .`
- Wait for Initialisation
- Wait! Dumps will take time!
- Enable Production `forgejo.enable = true; forgejo.initializeDatabase = false;`
- Apply config `nixos-rebuild switch --flake .`
-