Added flake.nix

This commit is contained in:
xeovalyte 2024-01-22 09:29:49 +01:00
parent 55db70e325
commit 0035d5bf3a
No known key found for this signature in database

31
flake.nix Normal file
View File

@ -0,0 +1,31 @@
{
description = "Rust development environment";
inputs = {
nixpkgs.url = "nixpkgs/nixos-23.11";
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs, nixpkgs-unstable }@inputs:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
overlay-unstable = final: prev: {
unstable = nixpkgs-unstable.legacyPackages.${prev.system};
};
in {
devShells.x86_64-linux.default =
pkgs.mkShell {
nativeBuildInputs = with pkgs; [
fish
rustc
cargo
];
shellHook = ''
echo "Running a nix development environment"
exec fish
'';
};
};
}