feat: refactor devshell as modular standalone path lol

This commit is contained in:
Rasyidan Akbar F. 2025-10-09 11:54:05 +07:00
commit 9e6791569e
9 changed files with 284 additions and 79 deletions

13
devshells/go.nix Normal file
View file

@ -0,0 +1,13 @@
{ pkgs, ... }:
pkgs.mkShell {
name = "go";
packages = with pkgs; [ go gopls golangci-lint delve git ];
shellHook = ''
mkdir -p "$PWD/.cache/go" "$PWD/.cache/gomod"
export GOPATH="$PWD/.cache/go"
export GOMODCACHE="$PWD/.cache/gomod"
echo "Go toolchain shell ready"
echo "Go: ${pkgs.go.version}"
'';
}