From 40804b0af1814c8d5ea1875283464673b7d3a28c Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Fri, 17 Jan 2020 15:36:29 +0100 Subject: Implement Jupyter Lab type in Tasker module Allows for convenient creation of shortcuts to Jupyter Lab sessions. As a bonus they are wrapped in Chromium App View instances and automatically terminated when required. --- tasks/default.nix | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'tasks') diff --git a/tasks/default.nix b/tasks/default.nix index 3521443..1ccda33 100644 --- a/tasks/default.nix +++ b/tasks/default.nix @@ -27,6 +27,15 @@ let ''; }; + jupyter = import (builtins.fetchGit { + url = https://github.com/tweag/jupyterWith; + rev = ""; + }) {}; + + mkJupyterEnv = kernel: (jupyter.jupyterlabWith { + kernels = [ kernel ]; + }).env; + in { custom.tasks = { bsc_edit = { @@ -101,5 +110,21 @@ in { sympy.init_session() ''; }; + + pymath_jupyter = { + description = "Python @ Jupyter Lab"; + directory = "~/"; + type = "jupyter-lab"; + environment = mkJupyterEnv ( + jupyter.kernels.iPythonWith { + name = "python"; + packages = p: with p; [ + numpy + sympy + matplotlib + ]; + } + ); + }; }; } -- cgit v1.2.3