Added nix

This commit is contained in:
2025-12-25 12:46:04 -07:00
parent 3822b1813c
commit f1f364537a
4 changed files with 71 additions and 1 deletions

1
.envrc Normal file
View File

@@ -0,0 +1 @@
use flake

6
.gitignore vendored
View File

@@ -1,2 +1,6 @@
.DS_Store
himbocrypt
himbocrypt
# nix
.direnv/
result

27
flake.lock generated Normal file
View File

@@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1766473571,
"narHash": "sha256-5G1NDO2PulBx1RoaA6U1YoUDX0qZslpPxv+n5GX6Qto=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "76701a179d3a98b07653e2b0409847499b2a07d3",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-25.11",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

38
flake.nix Normal file
View File

@@ -0,0 +1,38 @@
{
description = "himbocrypt 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 "<himbocrypt dev shell>"
echo "Go version: $(go version)"
'';
};
});
};
}