Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .envrc.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
set -a
use flake --impure
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ infinity_file_format*

# Secrets
.envrc
.direnv

# Editor files
.swp
Expand Down
2 changes: 1 addition & 1 deletion .mise.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[tools]
go = "1.25"
go = "1.25.0"
"go:github.com/go-delve/delve/cmd/dlv" = "latest"
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ repos:
stages: [pre-commit]
exclude: (?x)^([bg|fixtures])
- repo: https://github.com/commitizen-tools/commitizen
rev: v4.9.0
rev: v4.9.1
hooks:
- id: commitizen
stages: [commit-msg]
27 changes: 27 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
description = "";

inputs = {
nixpkgs.url = "github:nixos/nixpkgs/2cd3cac16691a933e94276f0a810453f17775c28";
};

outputs = { self, nixpkgs }:
let
systems = [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" ];
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
in {
devShells = forAllSystems (system:
let
pkgs = import nixpkgs { inherit system; };
in {
default = import (./. + "/shell.nix");
});
};
}
26 changes: 18 additions & 8 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
let
unstableTarball =
fetchTarball
https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz;
pkgs = import <nixpkgs> {};
unstable = import unstableTarball {};
fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/2cd3cac16691a933e94276f0a810453f17775c28.tar.gz";
sha256 = "06ad2257srqw8q4504hqm5hyb50vlckhgdfcjx81hxq3l1wy9i5j";
};
pkgs = import unstableTarball {};
shell = pkgs.mkShell {
# Libs
buildInputs = [
unstable.delve
pkgs.go
];
# Tools
nativeBuildInputs = [
pkgs.delve
pkgs.git
unstable.go
unstable.gopls
unstable.go-tools
pkgs.gopls
pkgs.go-tools
pkgs.pre-commit
];
shellHook = ''
# Make sure Go always has a valid temp dir
export TMPDIR=$(mktemp -d)
pre-commit install -f
'';
};
in shell