diff options
author | Ryan Lahfa <masterancpp@gmail.com> | 2022-12-01 16:02:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-01 16:02:16 +0100 |
commit | 2ae5aa0bd6f793b0c5f6bc5df7e697fea781006a (patch) | |
tree | 0248d2c64cb44c1fa78e73ecb4fa55a830730c4f /nixos | |
parent | 94ac4133798289b198a7d782887feef9fb426f25 (diff) | |
parent | 8eafc61e238d53da35dad025f2925e50d485606d (diff) |
Merge pull request #118036 from jluttine/add-jupyter-kernel-env
nixos/jupyter: add env kernel option
Diffstat (limited to 'nixos')
3 files changed, 14 insertions, 3 deletions
diff --git a/nixos/modules/services/development/jupyter/default.nix b/nixos/modules/services/development/jupyter/default.nix index 9b0178d3ea68..c3ef040ebe65 100644 --- a/nixos/modules/services/development/jupyter/default.nix +++ b/nixos/modules/services/development/jupyter/default.nix @@ -119,7 +119,7 @@ in { kernels = mkOption { type = types.nullOr (types.attrsOf(types.submodule (import ./kernel-options.nix { - inherit lib; + inherit lib pkgs; }))); default = null; diff --git a/nixos/modules/services/development/jupyter/kernel-options.nix b/nixos/modules/services/development/jupyter/kernel-options.nix index 42af47aeb3c8..6e406152de47 100644 --- a/nixos/modules/services/development/jupyter/kernel-options.nix +++ b/nixos/modules/services/development/jupyter/kernel-options.nix @@ -1,9 +1,11 @@ # Options that can be used for creating a jupyter kernel. -{lib }: +{ lib, pkgs }: with lib; { + freeformType = (pkgs.formats.json { }).type; + options = { displayName = mkOption { @@ -40,6 +42,15 @@ with lib; ''; }; + env = mkOption { + type = types.attrsOf types.str; + default = { }; + example = { OMP_NUM_THREADS = "1"; }; + description = lib.mdDoc '' + Environment variables to set for the kernel. + ''; + }; + logo32 = mkOption { type = types.nullOr types.path; default = null; diff --git a/nixos/modules/services/development/jupyterhub/default.nix b/nixos/modules/services/development/jupyterhub/default.nix index c0c0734cac09..cebc35a50476 100644 --- a/nixos/modules/services/development/jupyterhub/default.nix +++ b/nixos/modules/services/development/jupyterhub/default.nix @@ -119,7 +119,7 @@ in { kernels = mkOption { type = types.nullOr (types.attrsOf(types.submodule (import ../jupyter/kernel-options.nix { - inherit lib; + inherit lib pkgs; }))); default = null; |