Added nix
This commit is contained in:
5
.gitignore
vendored
5
.gitignore
vendored
@@ -3,3 +3,8 @@ bin/
|
||||
|
||||
# macOS
|
||||
.DS_Store
|
||||
|
||||
# nix
|
||||
.direnv/
|
||||
result
|
||||
|
||||
|
||||
38
flake.nix
Normal file
38
flake.nix
Normal file
@@ -0,0 +1,38 @@
|
||||
{
|
||||
description = "LilGuy dev shell";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs }:
|
||||
let
|
||||
allSystems = [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
"x86_64-darwin"
|
||||
"aarch64-darwin"
|
||||
];
|
||||
|
||||
forAllSystems = f: nixpkgs.lib.genAttrs allSystems (system: f {
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
});
|
||||
in
|
||||
{
|
||||
devShells = forAllSystems ({ pkgs }: {
|
||||
default = pkgs.mkShell {
|
||||
packages = with pkgs; [
|
||||
go
|
||||
gopls
|
||||
gotools
|
||||
go-tools
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
echo "<LilGuy dev shell>"
|
||||
echo "Go version: $(go version)"
|
||||
'';
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user