jupyenv
jupyenv copied to clipboard
Installing Jupyter globally (nixos-rebuild)
Is your feature request related to a problem? Please describe.
After running Jupyter correctly from a nix-shell, I'd like to install it globally so that it's generally available in my system. To do so, I'd like to include it in my configuration.nix, but probably because of my lack of experience in nix I have not been able to.
Describe the solution you'd like
A description on the README about how to include JupyterWith with different kernels on configuration.nix, so that it can be made globally available by running nixos-rebuild switch
.
Additional context
I've noticed that bringing jupyterWith to nixpkgs is already on the roadmap.
I think, Nothing different between nix-shell
and nixos-rebuild swtich
.
pkgs.buildEnv(nixos-builld option)
pkgs.mkShell
first, if the JupyterWith in all of top-level (nixpkgs). we just need to invoke pkgs.jupyterwith
in nixos configuation.file.
For example
let
iRust = pkgs.jupyterwith.kernels.rustWith {
name = "data-rust-env";
};
jupyterEnvironment =
pkgs.jupyterwith.jupyterlabWith {
kernels = [ iRust ];
};
in
environment.systemPackages = with pkgs; [
jupyterEnvironment
];
This doesn't work for me.
-
let
is required to be insideenvironment.systemPackages
-
pkgs.jupyterwith
is not available to me
I have the following in my configuration.nix
:
environment.systemPackages =
let
jupyter = import (builtins.fetchGit {
url = https://github.com/tweag/jupyterWith;
rev = "";
}) {};
iPython = jupyter.kernels.iPythonWith {
name = "python";
packages = p: with p; [ numpy ];
};
iHaskell = jupyter.kernels.iHaskellWith {
name = "haskell";
packages = p: with p; [ hvega formatting ];
};
jupyterEnvironment = jupyter.jupyterlabWith {
kernels = [ iPython iHaskell ];
};
in
with pkgs; [
jupyterEnvironment
]
but this does not allow me to run any of the standard jupyter commands from the terminal.
Please help.
As we are working on a flake version of this repository with an improved API we add to the roadmap to document this use case.