initial commit
This commit is contained in:
commit
69935bebf6
3 changed files with 981 additions and 0 deletions
52
flake.nix
Normal file
52
flake.nix
Normal 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);
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue