Refactor project structure and update configurations. Now first working version
- Updated `.air.conf` for Nix compatibility and simplified build commands. - Enhanced `.gitignore` to include `tmp` directory. - Improved `README.md` with clearer instructions and added language details. - Refined CSS styles for better UI consistency and added alert styles. - Upgraded `flake.nix` to use Go 1.24 and improved shell environment setup. - Modified authentication logic in `auth.go` for better user handling. - Updated `main.go` to dynamically set the listening port and improved logging. - Added new `routes.go` file for handling game entry and history. - Enhanced user models and added statistics tracking in `models.go`. - Improved template rendering and added user feedback messages in HTML templates. - Removed obsolete build error logs and binaries.
This commit is contained in:
16
flake.nix
16
flake.nix
@@ -12,10 +12,9 @@
|
||||
devShells = forAllSystems (pkgs:
|
||||
let
|
||||
# Pick the Go you want. pkgs.go is fine; change to pkgs.go_1_23 if you prefer a fixed version.
|
||||
go = pkgs.go;
|
||||
go = pkgs.go_1_24;
|
||||
in {
|
||||
default = pkgs.mkShell {
|
||||
# Tools required for cgo and sqlite
|
||||
buildInputs = [
|
||||
go
|
||||
pkgs.gcc
|
||||
@@ -23,25 +22,18 @@
|
||||
pkgs.sqlite
|
||||
];
|
||||
|
||||
# Optional (handy) tools
|
||||
nativeBuildInputs = [
|
||||
pkgs.git
|
||||
];
|
||||
|
||||
# Enable CGO so mattn/go-sqlite3 works
|
||||
CGO_ENABLED = 1;
|
||||
|
||||
# If you plan static linking, uncomment:
|
||||
# hardeningDisable = [ "fortify" ];
|
||||
|
||||
shellHook = ''
|
||||
echo "🔧 Nix dev shell ready (CGO_ENABLED=1)."
|
||||
echo "▶ Run: go run ."
|
||||
echo 'Inside nix shell.'
|
||||
'';
|
||||
};
|
||||
});
|
||||
|
||||
# Convenience runner: `nix run`
|
||||
# Used for nix run
|
||||
apps = forAllSystems (pkgs: {
|
||||
default = {
|
||||
type = "app";
|
||||
@@ -53,7 +45,7 @@
|
||||
};
|
||||
});
|
||||
|
||||
# Optional: formatter for this repo
|
||||
# Nix formatter
|
||||
formatter = forAllSystems (pkgs: pkgs.nixpkgs-fmt);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user