chore: add nix flake

This commit is contained in:
Xavier Morel
2025-03-21 17:15:41 +01:00
parent df600eb18e
commit b37cc89cf2
3 changed files with 68 additions and 0 deletions

39
flake.nix Normal file
View File

@@ -0,0 +1,39 @@
{
description = "Dev shell";
# Flake inputs
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
# Flake outputs
outputs = { self, nixpkgs, ... }:
let
allSystems = [
"x86_64-linux" # 64-bit Intel/AMD Linux
"aarch64-linux" # 64-bit ARM Linux
"x86_64-darwin" # 64-bit Intel macOS
"aarch64-darwin" # 64-bit ARM macOS
];
forAllSystems = f: nixpkgs.lib.genAttrs allSystems (system: f {
pkgs = import nixpkgs { inherit system; };
});
in
{
devShells = forAllSystems ({ pkgs }: {
default = pkgs.mkShell {
packages = (with pkgs; [
python313
onefetch
uv
ruff
]);
shellHook = ''
onefetch
uv sync
'';
};
});
};
}