setup jupyterhub
This commit is contained in:
parent
82231ab120
commit
0e27c72344
|
@ -12,6 +12,7 @@
|
|||
# Services
|
||||
"/var/lib/crowdsec"
|
||||
"/var/lib/forgejo"
|
||||
"/var/lib/jupyterhub"
|
||||
"/var/lib/minecraft"
|
||||
"/var/lib/traefik"
|
||||
# Multimedia
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
./borgbackup
|
||||
./crowdsec
|
||||
./forgejo
|
||||
./jupyterhub
|
||||
./lighttpd
|
||||
./minecraft
|
||||
./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