nixos/hosts/common/optional/dbt_profiles.nix
Sam eaebfcaeb4 Add dbt profiles configuration and update baseddata-worker
- Add 'dbt_profiles.nix' file to configure dbt profiles for baseddata
- Update 'baseddata-worker.nix' to import dbt profiles and modify environment variables
- Remove dbt profiles configuration from user-specific default.nix for sam
2024-12-28 10:07:25 +00:00

26 lines
680 B
Nix

{configVars, config, ...}:
let
baseddataPostgresIp = configVars.networking.addresses.postgres.ip;
in
{
sops.templates."dbt_profiles.yml" = {
path = "/run/secrets/templates/dbt/profiles.yml";
mode = "0600";
content = ''
baseddata:
target: prod
outputs:
prod:
dbname: baseddata
host: ${baseddataPostgresIp}
pass: '${config.sops.placeholder."software/postgres/baseddata/user_password"}'
port: 5432
schema: models
threads: 6
type: postgres
user: ${config.sops.placeholder."software/postgres/baseddata/user_username"}
'';
};
}