initial commit

This commit is contained in:
Vinzenz Schroeter 2025-08-17 16:58:51 +02:00
commit 69935bebf6
3 changed files with 981 additions and 0 deletions

52
flake.nix Normal file
View file

@ -0,0 +1,52 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-25.05";
};
outputs =
{ self, nixpkgs }:
let
supported-systems = [
"x86_64-linux"
"aarch64-linux"
];
forAllSystems =
f:
nixpkgs.lib.genAttrs supported-systems (
system:
f rec {
pkgs = nixpkgs.legacyPackages.${system};
inherit system;
}
);
in
{
# https://yannipapandreou.github.io/posts/jupyter-kernels-nix/index.html
devShells = forAllSystems (
{ pkgs, ... }:
{
default = pkgs.mkShellNoCC {
packages =
let
pythonPackages =
ps: with ps; [
ipykernel
jupyterlab
matplotlib
numpy
];
pythonEnv = pkgs.python3.withPackages pythonPackages;
in
[
pythonEnv
];
shellHook = ''
echo "Jupyter with Python kernel is ready. Run: 'jupyter lab' to launch."
'';
};
}
);
formatter = forAllSystems ({ pkgs, ... }: pkgs.nixfmt-rfc-style);
};
}