Initial commit

This commit is contained in:
2025-11-29 16:59:02 -06:00
commit da4f051282
25 changed files with 1144 additions and 0 deletions

63
flake.nix Normal file
View File

@@ -0,0 +1,63 @@
{
description = "Go development environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs =
{
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
go
gotools
gopls
go-outline
gocode-gomod
gopkgs
godef
golint
air
postgresql
pgcli
migrate
docker
docker-compose
jq
curl
just
];
shellHook = ''
echo ""
echo "🚀 Go Development Environment"
echo ""
echo "Go version: $(go version | cut -d' ' -f3)"
echo "PostgreSQL: $(postgres --version | cut -d' ' -f3)"
echo ""
echo "Quick commands:"
echo " docker-compose up -d # Start Postgres"
echo " docker-compose down # Stop Postgres"
echo " just migrate-up # Run migrations"
echo " just run # Run the API"
echo ""
'';
};
}
);
}