This commit is contained in:
2026-04-01 14:19:21 +01:00
parent f5f1be1e52
commit fd7f8e7748
3 changed files with 42 additions and 2 deletions

View File

@@ -1,12 +1,13 @@
{ {
description = "A very basic flake"; description = "Provides nix flakes for development";
outputs = outputs =
{ self }: { self }:
{ {
templates = { templates = {
rust = { rust = {
path = ./rust-template; path = ./rust;
description = "A standard Rust development environment"; description = "A standard Rust development environment";
}; };
}; };

39
shell/flake.nix Normal file
View File

@@ -0,0 +1,39 @@
{
description = "A simple Rust development environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
utils.url = "github:numtide/flake-utils";
};
outputs =
{
self,
nixpkgs,
utils,
}:
utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs { inherit system; };
in
{
devShells.default = pkgs.mkShell {
name = "flake";
buildInputs = with pkgs; [
# Add packages
];
# Environment variables
shellHook = ''
# Trigger zsh
if [[ -z "$ZSH_VERSION" ]]; then
exec zsh
fi
'';
};
}
);
}