about summary refs log tree commit diff
path: root/nixos/modules/services/development
diff options
context:
space:
mode:
authorhqurve <hqurve@outlook.com>2022-03-13 17:45:28 -0400
committerhqurve <hqurve@outlook.com>2022-03-13 17:45:28 -0400
commit5536b56135a3d2909651535b7b66ecad2dd8f882 (patch)
treec17b35f3216a305345ea1825807af765c0d8b88f /nixos/modules/services/development
parentd011ca205fdd40828186d196cc1a678638687211 (diff)
downloadnixlib-5536b56135a3d2909651535b7b66ecad2dd8f882.tar
nixlib-5536b56135a3d2909651535b7b66ecad2dd8f882.tar.gz
nixlib-5536b56135a3d2909651535b7b66ecad2dd8f882.tar.bz2
nixlib-5536b56135a3d2909651535b7b66ecad2dd8f882.tar.lz
nixlib-5536b56135a3d2909651535b7b66ecad2dd8f882.tar.xz
nixlib-5536b56135a3d2909651535b7b66ecad2dd8f882.tar.zst
nixlib-5536b56135a3d2909651535b7b66ecad2dd8f882.zip
nixos/jupyter: Add kernels.<name>.extraPaths option
Diffstat (limited to 'nixos/modules/services/development')
-rw-r--r--nixos/modules/services/development/jupyter/default.nix3
-rw-r--r--nixos/modules/services/development/jupyter/kernel-options.nix9
2 files changed, 12 insertions, 0 deletions
diff --git a/nixos/modules/services/development/jupyter/default.nix b/nixos/modules/services/development/jupyter/default.nix
index bebb3c3f13f0..f8d77a1131e3 100644
--- a/nixos/modules/services/development/jupyter/default.nix
+++ b/nixos/modules/services/development/jupyter/default.nix
@@ -143,6 +143,9 @@ in {
             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";
+            };
           };
         }
       '';
diff --git a/nixos/modules/services/development/jupyter/kernel-options.nix b/nixos/modules/services/development/jupyter/kernel-options.nix
index 348a8b44b382..0a9eaafa3185 100644
--- a/nixos/modules/services/development/jupyter/kernel-options.nix
+++ b/nixos/modules/services/development/jupyter/kernel-options.nix
@@ -56,5 +56,14 @@ with lib;
         Path to 64x64 logo png.
       '';
     };
+
+    extraPaths = mkOption {
+      type = types.attrsOf types.path;
+      default = { };
+      example = literalExpression ''"{ examples = ''${env.sitePack}/IRkernel/kernelspec/kernel.js"; }'';
+      description = ''
+        Extra paths to link in kernel directory
+      '';
+    };
   };
 }