32 lines
826 B
Nix

{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
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
tailwindcss_4
gnumake
postgresql_17
];
};
apps.default = {
type = "app";
program = toString (pkgs.writeShellScript "serve" ''
# install templ if not already installed
command -v templ > /dev/null || go install github.com/a-h/templ/cmd/templ@latest
${pkgs.make}/bin/make build
'');
};
}
);
}