From ca1606a6a301933a3cf4a081f34795184769cdf8 Mon Sep 17 00:00:00 2001 From: prescientmoon Date: Wed, 22 May 2024 14:04:20 +0200 Subject: [PATCH] Add tabulate to jupyter --- hosts/nixos/lapetus/services/forgejo.nix | 5 ++-- hosts/nixos/lapetus/services/jupyter.nix | 30 +++++++++++++++++------- 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/hosts/nixos/lapetus/services/forgejo.nix b/hosts/nixos/lapetus/services/forgejo.nix index bf91e62..64c0927 100644 --- a/hosts/nixos/lapetus/services/forgejo.nix +++ b/hosts/nixos/lapetus/services/forgejo.nix @@ -15,7 +15,6 @@ in services.forgejo = { enable = true; - appName = "moonforge"; stateDir = "/persist/state/var/lib/forgejo"; mailerPasswordFile = config.sops.secrets.forgejo_mail_password.path; @@ -28,7 +27,8 @@ in # See [the cheatsheet](https://docs.gitea.com/next/administration/config-cheat-sheet) settings = { - session.COOKIE_SECURE = true; + default.APP_NAME = "moonforge"; + server = { DOMAIN = host; HTTP_PORT = port; @@ -38,6 +38,7 @@ in cron.ENABLED = true; service.DISABLE_REGISTRATION = true; + session.COOKIE_SECURE = true; mailer = { ENABLED = true; diff --git a/hosts/nixos/lapetus/services/jupyter.nix b/hosts/nixos/lapetus/services/jupyter.nix index 3083dcb..f454d15 100644 --- a/hosts/nixos/lapetus/services/jupyter.nix +++ b/hosts/nixos/lapetus/services/jupyter.nix @@ -1,11 +1,24 @@ -{ config, pkgs, ... }: -# {{{ Jupyterhub/lab env -let appEnv = pkgs.python3.withPackages (p: with p; [ - jupyterhub - jupyterlab - jupyterhub-systemdspawner - jupyter-collaboration -]); +{ config, lib, pkgs, ... }: +let + # {{{ Jupyterhub/lab env + appEnv = pkgs.python3.withPackages (p: with p; [ + jupyterhub + jupyterlab + jupyterhub-systemdspawner + jupyter-collaboration + ]); + # }}} + # {{{ Client wrapper + deps = [ ]; + wrappedAppEnv = pkgs.symlinkJoin { + inherit (appEnv) name meta; + paths = [ appEnv ]; + nativeBuildInputs = [ pkgs.makeWrapper ]; + postBuild = '' + wrapProgram $out/bin/* \ + --prefix PATH : ${lib.makeBinPath deps} + ''; + }; # }}} in { @@ -33,6 +46,7 @@ in numpy scipy matplotlib + tabulate ])); in {