Open jupyter through tunnel
This commit is contained in:
parent
7c6143ae9e
commit
ac7107dccb
|
@ -9,7 +9,6 @@ let appEnv = pkgs.python3.withPackages (p: with p; [
|
||||||
# }}}
|
# }}}
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
||||||
services.jupyterhub = {
|
services.jupyterhub = {
|
||||||
enable = true;
|
enable = true;
|
||||||
port = 8420;
|
port = 8420;
|
||||||
|
@ -17,8 +16,8 @@ in
|
||||||
jupyterhubEnv = appEnv;
|
jupyterhubEnv = appEnv;
|
||||||
jupyterlabEnv = appEnv;
|
jupyterlabEnv = appEnv;
|
||||||
|
|
||||||
|
# {{{ Spwaner & auth config
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
c.LocalAuthenticator.create_system_users = False
|
|
||||||
c.Authenticator.allowed_users = {'adrielus', 'javi'}
|
c.Authenticator.allowed_users = {'adrielus', 'javi'}
|
||||||
c.Authenticator.admin_users = {'adrielus', 'javi'}
|
c.Authenticator.admin_users = {'adrielus', 'javi'}
|
||||||
|
|
||||||
|
@ -26,7 +25,7 @@ in
|
||||||
c.SystemdSpawner.mem_limit = '2G'
|
c.SystemdSpawner.mem_limit = '2G'
|
||||||
c.SystemdSpawner.cpu_limit = 2.0
|
c.SystemdSpawner.cpu_limit = 2.0
|
||||||
'';
|
'';
|
||||||
|
# }}}
|
||||||
# {{{ Python 3 kernel
|
# {{{ Python 3 kernel
|
||||||
kernels.python3 =
|
kernels.python3 =
|
||||||
let env = (pkgs.python3.withPackages (p: with p; [
|
let env = (pkgs.python3.withPackages (p: with p; [
|
||||||
|
@ -62,13 +61,9 @@ in
|
||||||
hashedPasswordFile = config.sops.secrets.javi_password.path;
|
hashedPasswordFile = config.sops.secrets.javi_password.path;
|
||||||
};
|
};
|
||||||
# }}}
|
# }}}
|
||||||
# {{{ Networking
|
# {{{ Networking & storage
|
||||||
services.nginx.virtualHosts."jupyter.moonythm.dev" =
|
satellite.cloudflared.targets."jupyter.moonythm.dev".port = config.services.jupyterhub.port;
|
||||||
config.satellite.proxy
|
|
||||||
config.services.jupyterhub.port
|
|
||||||
{ proxyWebsockets = true; };
|
|
||||||
# }}}
|
|
||||||
# {{{ Storage
|
|
||||||
environment.persistence."/persist/state".directories = [
|
environment.persistence."/persist/state".directories = [
|
||||||
"/var/lib/${config.services.jupyterhub.stateDirectory}"
|
"/var/lib/${config.services.jupyterhub.stateDirectory}"
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue