add flake

This commit is contained in:
uku 2024-11-07 20:59:36 +01:00
parent e133421bed
commit 5261c5592b
Signed by: uku
SSH key fingerprint: SHA256:4P0aN6M8ajKukNi6aPOaX0LacanGYtlfjmN+m/sHY/o
2 changed files with 82 additions and 0 deletions

34
flake.nix Normal file
View file

@ -0,0 +1,34 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
};
outputs = {
self,
flake-parts,
...
} @ inputs:
flake-parts.lib.mkFlake {inherit inputs;} {
systems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"];
perSystem = {
lib,
pkgs,
self',
...
}: {
devShells.default = with pkgs;
mkShell {
packages = [clippy rustfmt rust-analyzer redis xh];
RUST_SRC_PATH = "${pkgs.rustPlatform.rustLibSrc}";
};
formatter = pkgs.alejandra;
};
};
}