setup jupyterhub
This commit is contained in:
parent
82231ab120
commit
0e27c72344
|
@ -12,6 +12,7 @@
|
||||||
# Services
|
# Services
|
||||||
"/var/lib/crowdsec"
|
"/var/lib/crowdsec"
|
||||||
"/var/lib/forgejo"
|
"/var/lib/forgejo"
|
||||||
|
"/var/lib/jupyterhub"
|
||||||
"/var/lib/minecraft"
|
"/var/lib/minecraft"
|
||||||
"/var/lib/traefik"
|
"/var/lib/traefik"
|
||||||
# Multimedia
|
# Multimedia
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
./borgbackup
|
./borgbackup
|
||||||
./crowdsec
|
./crowdsec
|
||||||
./forgejo
|
./forgejo
|
||||||
|
./jupyterhub
|
||||||
./lighttpd
|
./lighttpd
|
||||||
./minecraft
|
./minecraft
|
||||||
./mpd
|
./mpd
|
||||||
|
|
31
nixos/viridian/services/jupyterhub/default.nix
Normal file
31
nixos/viridian/services/jupyterhub/default.nix
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
{config, ...}: {
|
||||||
|
services.jupyterhub = {
|
||||||
|
enable = true;
|
||||||
|
port = 9475;
|
||||||
|
extraConfig = ''
|
||||||
|
c.Authenticator.allowed_users = {'sajenim'}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
services.traefik.dynamicConfigOptions.http.routers = {
|
||||||
|
jupyter = {
|
||||||
|
rule = "Host(`jupyter.home.arpa`)";
|
||||||
|
entryPoints = [
|
||||||
|
"websecure"
|
||||||
|
];
|
||||||
|
service = "jupyter";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.traefik.dynamicConfigOptions.http.services = {
|
||||||
|
jupyter.loadBalancer.servers = [
|
||||||
|
{url = "http://127.0.0.1:${toString config.services.jupyterhub.port}";}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.persistence."/persist" = {
|
||||||
|
directories = [
|
||||||
|
"/var/lib/jupyterhub"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue