Jupyter
services.jupyter.command
Which command the service runs. Note that not all jupyter packages have all commands, e.g. jupyter-lab isn't present in the default package.
Type: string
Default
"jupyter-notebook"
Example
"jupyter-lab"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/jupyter/default.nix
services.jupyter.enable
Whether to enable Jupyter development server.
Type: boolean
Default
false
Example
true
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/jupyter/default.nix
services.jupyter.group
Name of the group used to run the jupyter service. Use this if you want to create a group of users that are able to view the notebook directory's content.
Type: string
Default
"jupyter"
Example
"users"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/jupyter/default.nix
services.jupyter.ip
IP address Jupyter will be listening on.
Type: string
Default
"localhost"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/jupyter/default.nix
services.jupyter.kernels
Declarative kernel config.
Kernels can be declared in any language that supports and has the required dependencies to communicate with a jupyter server. In python's case, it means that ipykernel package must always be included in the list of packages of the targeted environment.
Type: null or (attribute set of (JSON value))
Default
null
Example
{python3 = letenv = (pkgs.python3.withPackages (pythonPackages: with pythonPackages; [ipykernelpandasscikit-learn]));in {displayName = "Python 3 for machine learning";argv = ["${env.interpreter}""-m""ipykernel_launcher""-f""{connection_file}"];language = "python";logo32 = "${env.sitePackages}/ipykernel/resources/logo-32x32.png";logo64 = "${env.sitePackages}/ipykernel/resources/logo-64x64.png";extraPaths = {"cool.txt" = pkgs.writeText "cool" "cool content";};};}
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/jupyter/default.nix
services.jupyter.kernels.<name>.argv
Command and arguments to start the kernel.
Type: list of string
Example
["{customEnv.interpreter}""-m""ipykernel_launcher""-f""{connection_file}"]
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/jupyter/default.nix
services.jupyter.kernels.<name>.displayName
Name that will be shown to the user.
Type: string
Default
""
Example
"Python 3""Python 3 for Data Science"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/jupyter/default.nix
services.jupyter.kernels.<name>.env
Environment variables to set for the kernel.
Type: attribute set of string
Default
{ }
Example
{OMP_NUM_THREADS = "1";}
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/jupyter/default.nix
services.jupyter.kernels.<name>.extraPaths
Extra paths to link in kernel directory
Type: attribute set of path
Default
{ }
Example
"{ examples = ${env.sitePack}/IRkernel/kernelspec/kernel.js"; }
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/jupyter/default.nix
services.jupyter.kernels.<name>.language
Language of the environment. Typically the name of the binary.
Type: string
Example
"python"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/jupyter/default.nix
services.jupyter.kernels.<name>.logo32
Path to 32x32 logo png.
Type: null or path
Default
null
Example
"${env.sitePackages}/ipykernel/resources/logo-32x32.png"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/jupyter/default.nix
services.jupyter.kernels.<name>.logo64
Path to 64x64 logo png.
Type: null or path
Default
null
Example
"${env.sitePackages}/ipykernel/resources/logo-64x64.png"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/jupyter/default.nix
services.jupyter.notebookConfig
Raw jupyter config.
Type: strings concatenated with "\n"
Default
""
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/jupyter/default.nix
services.jupyter.notebookDir
Root directory for notebooks.
Type: string
Default
"~/"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/jupyter/default.nix
services.jupyter.package
The notebook package to use.
Type: package
Default
pkgs.python3.pkgs.notebook
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/jupyter/default.nix
services.jupyter.password
Password to use with notebook. Can be generated using: In [1]: from notebook.auth import passwd In [2]: passwd('test') Out[2]: 'sha1:1b961dc713fb:88483270a63e57d18d43cf337e629539de1436ba' NOTE: you need to keep the single quote inside the nix string. Or you can use a python oneliner: "open('/path/secret_file', 'r', encoding='utf8').read().strip()" It will be interpreted at the end of the notebookConfig.
Type: string
Example
"'sha1:1b961dc713fb:88483270a63e57d18d43cf337e629539de1436ba'"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/jupyter/default.nix
services.jupyter.port
Port number Jupyter will be listening on.
Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)
Default
8888
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/jupyter/default.nix
services.jupyter.user
Name of the user used to run the jupyter service. For security reason, jupyter should really not be run as root. If not set (jupyter), the service will create a jupyter user with appropriate settings.
Type: string
Default
"jupyter"
Example
"aborsu"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/development/jupyter/default.nix