From 8eafc61e238d53da35dad025f2925e50d485606d Mon Sep 17 00:00:00 2001 From: Jaakko Luttinen Date: Fri, 14 Oct 2022 20:19:09 +0300 Subject: [PATCH] nixos/jupyter: make kernel options freeform JSON --- nixos/modules/services/development/jupyter/default.nix | 2 +- nixos/modules/services/development/jupyter/kernel-options.nix | 4 +++- nixos/modules/services/development/jupyterhub/default.nix | 2 +- 3 files changed, 5 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 3c91d531b0ef..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 { 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;