Skip to content

Commit 1c49019

Browse files
committed
yash's useless nix shit :D
1 parent 5a99b03 commit 1c49019

3 files changed

Lines changed: 55 additions & 0 deletions

File tree

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,7 @@ go.work.sum
2626

2727
# Editor/IDE
2828
.vscode/
29+
30+
31+
# Some nix shit
32+
.gopath/

flake.lock

Lines changed: 27 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
description = "Dev environment for req";
3+
4+
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
5+
6+
outputs = { self, nixpkgs, }: {
7+
devShells.x86_64-linux.default =
8+
let pkgs = import nixpkgs { system = "x86_64-linux"; };
9+
in pkgs.mkShell {
10+
buildInputs = [ pkgs.go pkgs.zsh ];
11+
12+
shellHook = ''
13+
export GOPATH=$PWD/.gopath
14+
export GOBIN=$GOPATH/bin
15+
export PATH=$GOBIN:$PATH
16+
mkdir -p "$GOBIN"
17+
go mod tidy
18+
if [ -z "$ZSH_VERSION" ]; then
19+
exec zsh
20+
fi
21+
'';
22+
};
23+
};
24+
}

0 commit comments

Comments
 (0)