Consolidate PostgreSQL database and role-password boilerplate on Vega #274
Labels
No labels
area:authentication
area:flake-utilities
area:performance
area:tbd
host:chaos
host:cosmos
host:electra
host:fleet
host:lena
host:lyra
host:mass-storage
host:media1
host:nimmog-de
host:nova
host:pangolin
host:pangolin-vps
host:phone
host:router
host:vega
investigation
phase:cutover
phase:deploy
phase:mcp
phase:module
phase:packaging
phase:prep
phase:validation
priority:high
priority:medium
project:attic-postgres-lyra-rollout
project:auto-update-reliability
project:auto-update-remediation
project:declarative-purity-cleanup
project:external-review
project:fleet-boundary-cleanup
project:host-facts-refactor
project:lyra-nixos-deploy
project:lyra-service-stack-migration
project:nebula-mesh-network
project:nix-idioms-hygiene
project:nixos-build-deployment-pipeline
project:security-hardening
project:service-stack-migration
project:vega-sillytavern-cutover
project:wiki-rebuild
repo:numtide/flake-utils
repo:numtide/nix-auth
repo:numtide/nixos-passthru-cache
repo:numtide/nix-relay
service:auto-update
service:gitlab
service:hermes
service:mem0
service:nix
service:sillytavern
service:slskd
service:synthseek
service:tdarr
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
nimmo/nixos-config#274
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context & Problem
In
hosts/vega/databases/:paperless.nixradarr.nixsonarr.nixwhisparr-v3.nixfreshrss.nixmodules/databases/immich.nixAll repeat almost identical ~50-line oneshot systemd services (
postgresql-set-<service>-password) executingALTER ROLE <name> WITH LOGIN PASSWORD '$password'using SOPS secret paths.Additionally, single-database definitions (
atticd.nix,forgejo.nix,metamcp.nix,openwebui.nix,postgres.nix) exist as tiny 3-line files doing nothing other thanservices.postgresql.ensureDatabases = [ "<name>" ];.Scope
hosts/vega/databases/modules/databases/immich.nixmodules/databases/postgresql-role-password.nix(or an option inpostgresql.nix)Implementation Checklist
services.postgresql.rolePasswords.<name> = { sopsFile = ...; key = ...; databases = [ ... ]; };) that generates the required SOPS secret and oneshot password configuration service.paperless.nix,radarr.nix,sonarr.nix,whisparr-v3.nix,freshrss.nix, andimmich.nixto use this declarative abstraction.ensureDatabasesfiles into a single coherent list inhosts/vega/databases/postgresql.nix.Completion Criteria
nix flake checkpasses.Completed in PR #287.
modules/databases/postgresql-role-password.nixproviding declarativeservices.postgresql.rolePasswords.<name>.freshrss,paperless,radarr,sonarr,whisparr-v3, andimmich.atticd,forgejo,metamcp,openwebui,postgres) intohosts/vega/databases/postgresql.nix.mainin commit684d22c.