initial jupyenv setup

This commit is contained in:
Clara Dautermann 2025-04-08 07:45:24 +02:00
commit f2400c541a
Signed by: clara
GPG key ID: 223391B52FAD4463
5 changed files with 694 additions and 0 deletions

45
flake.nix Normal file
View file

@ -0,0 +1,45 @@
{
description = "Your jupyenv project";
nixConfig.extra-substituters = [
"https://tweag-jupyter.cachix.org"
];
nixConfig.extra-trusted-public-keys = [
"tweag-jupyter.cachix.org-1:UtNH4Zs6hVUFpFBTLaA4ejYavPo5EFFqgd7G7FxGW9g="
];
inputs.flake-compat.url = "github:edolstra/flake-compat";
inputs.flake-compat.flake = false;
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
inputs.jupyenv.url = "github:tweag/jupyenv";
outputs =
{ self
, flake-compat
, flake-utils
, nixpkgs
, jupyenv
, ...
} @ inputs:
flake-utils.lib.eachSystem
[
flake-utils.lib.system.x86_64-linux
]
(
system:
let
inherit (jupyenv.lib.${system}) mkJupyterlabNew;
jupyterlab = mkJupyterlabNew ({ ... }: {
nixpkgs = inputs.nixpkgs;
imports = [ (import ./kernels.nix) ];
});
in
rec {
packages = { inherit jupyterlab; };
packages.default = jupyterlab;
apps.default.program = "${jupyterlab}/bin/jupyter-lab";
apps.default.type = "app";
}
);
}