Files
metadata-agregator/devenv.nix
T
2026-07-12 10:16:54 +02:00

63 lines
1.0 KiB
Nix

{
pkgs,
lib,
config,
inputs,
...
}:
{
languages.go.enable = true;
git-hooks.hooks = {
treefmt.enable = true;
};
treefmt = {
enable = true;
config.programs = {
nixfmt.enable = true;
gofmt.enable = true;
};
};
packages = with pkgs; [
pre-commit
gitleaks
plantuml
gopls
gotools
go-tools
golangci-lint
buf
protoc-gen-go
protoc-gen-go-grpc
grpcurl
opencode
];
services.postgres = {
enable = true;
listen_addresses = "localhost";
initialDatabases = [
{
name = "metadata_agregator";
schema = ./nix/schema/001_schema.sql;
}
];
initialScript = ''
CREATE USER agregator WITH PASSWORD 'agregator';
GRANT ALL PRIVILEGES ON DATABASE metadata_agregator TO agregator;
\c metadata_agregator
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO agregator;
GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO agregator;
GRANT ALL ON SCHEMA public TO agregator;
'';
};
}