Merge pull request #118036 from jluttine/add-jupyter-kernel-env

nixos/jupyter: add env kernel option
This commit is contained in:
Ryan Lahfa 2022-12-01 16:02:16 +01:00 committed by GitHub
commit 2ae5aa0bd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 3 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;