initial flake setup

This commit is contained in:
2025-11-30 16:54:01 +01:00
commit 34bce88d46

29
flake.nix Normal file
View File

@@ -0,0 +1,29 @@
{
description = "Development environment for Zig using Nix flakes";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs }: let
system = "x86_64-linux"; # or "aarch64-linux", "aarch64-darwin", etc.
pkgs = import nixpkgs { inherit system; };
in {
devShells.${system}.default = pkgs.mkShell {
name = "zig-dev-shell";
buildInputs = [
pkgs.zig
pkgs.zls # Zig Language Server (optional)
pkgs.gdb # Debugger (optional)
pkgs.pkg-config
];
shellHook = ''
echo "Zig development environment activated."
zig version
'';
};
};
}