Add Javi user for jupyter
This commit is contained in:
parent
c9507aa47c
commit
1493fbb54c
|
@ -12,3 +12,4 @@ microbin_env: |
|
||||||
MICROBIN_ADMIN_PASSWORD=...
|
MICROBIN_ADMIN_PASSWORD=...
|
||||||
MICROBIN_UPLOAD_PASSWORD=...
|
MICROBIN_UPLOAD_PASSWORD=...
|
||||||
forgejo_mail_password: ...
|
forgejo_mail_password: ...
|
||||||
|
javi_password: ...
|
||||||
|
|
|
@ -6,6 +6,7 @@ invidious_hmac_key: ENC[AES256_GCM,data:eN3NNPYUSfPNnVz3aZK7IrnzoBA=,iv:eHEiB/TK
|
||||||
cloudflare_tunnel_credentials: ENC[AES256_GCM,data:XuXXzhGdxYsF1ik2g7yS2wbaI08/AF60P8CnIhjJlMd+jRk36QovuBRRjkfV8BjOg0K+2b4yNHT/nS/ZSV6eorj4sbczw6D+p7LxrQfeVqqhXWyCjbJwQTTDFU9XB2xUohmmC1PJ1/nwShfn1LocPxgwWQiNpqwhTJroojzqxTHUBzCuAMmcZ7jwvd0SlDpZIszhbTQoLRzedRZpCdoNnWTc,iv:2oBLU3SvNUwJ2OYfCmyKiocUw9zU+yixO+tY/AE9sxc=,tag:T3v+MII+kDzomiAQJ0zUdg==,type:str]
|
cloudflare_tunnel_credentials: ENC[AES256_GCM,data:XuXXzhGdxYsF1ik2g7yS2wbaI08/AF60P8CnIhjJlMd+jRk36QovuBRRjkfV8BjOg0K+2b4yNHT/nS/ZSV6eorj4sbczw6D+p7LxrQfeVqqhXWyCjbJwQTTDFU9XB2xUohmmC1PJ1/nwShfn1LocPxgwWQiNpqwhTJroojzqxTHUBzCuAMmcZ7jwvd0SlDpZIszhbTQoLRzedRZpCdoNnWTc,iv:2oBLU3SvNUwJ2OYfCmyKiocUw9zU+yixO+tY/AE9sxc=,tag:T3v+MII+kDzomiAQJ0zUdg==,type:str]
|
||||||
microbin_env: ENC[AES256_GCM,data:nxiE9GIvEb0xgqomDdMyy2UtG25pt7h+6JUZkAgIejZbJfsKfpIJcG02WJoj07I2VeTtN10Wd8IbrW9QEt64mLzlG7hqJN0Uwq8bjL1j5IaK,iv:pCWmF52MhMfZtdtMsL7wwt+KB33E/UPNtXzkiJ7NOWE=,tag:79e0u2yyRYckivY85hLqpg==,type:str]
|
microbin_env: ENC[AES256_GCM,data:nxiE9GIvEb0xgqomDdMyy2UtG25pt7h+6JUZkAgIejZbJfsKfpIJcG02WJoj07I2VeTtN10Wd8IbrW9QEt64mLzlG7hqJN0Uwq8bjL1j5IaK,iv:pCWmF52MhMfZtdtMsL7wwt+KB33E/UPNtXzkiJ7NOWE=,tag:79e0u2yyRYckivY85hLqpg==,type:str]
|
||||||
forgejo_mail_password: ENC[AES256_GCM,data:linrpmA8b+8e1+tWNl0=,iv:Mk7suPq0Jt960Zl9s2jj3SSAKt4t8Lv4eKdIo0o8JbE=,tag:TZ0qGJIVSFSUt/0cqamvdw==,type:str]
|
forgejo_mail_password: ENC[AES256_GCM,data:linrpmA8b+8e1+tWNl0=,iv:Mk7suPq0Jt960Zl9s2jj3SSAKt4t8Lv4eKdIo0o8JbE=,tag:TZ0qGJIVSFSUt/0cqamvdw==,type:str]
|
||||||
|
javi_password: ENC[AES256_GCM,data:5Ifh/DclUz0/AL69Th/GckolrjerLOnDW77SOf+/L3v39T+EOYgK2GDNKtWGGWYX5sdxZ9JwLS3ZVsIOnN4zjFhgV+GChJWkkzjdpJEtpHlmmBKlyS31Fw7SixVkL3y3VJhw72aVv3bMKQ==,iv:FzAmvIlrhna5InsQCRrWVdrKZGmHMb0njWdvgBurdYs=,tag:/Iguu2FbdV/4RSGTnFdyYA==,type:str]
|
||||||
sops:
|
sops:
|
||||||
kms: []
|
kms: []
|
||||||
gcp_kms: []
|
gcp_kms: []
|
||||||
|
@ -30,8 +31,8 @@ sops:
|
||||||
RHZ6alYrUU5BZ2xlMkdGR1dWRG5aeGMKJdsdtVZ6Mk9Vo3a+tS+rzAgaF2wpH+8U
|
RHZ6alYrUU5BZ2xlMkdGR1dWRG5aeGMKJdsdtVZ6Mk9Vo3a+tS+rzAgaF2wpH+8U
|
||||||
lWhA+c0Kbe8EJT8hm7Vr8PqBmElz4V9AnXSCTp7D+Cu4pfWsHopLUQ==
|
lWhA+c0Kbe8EJT8hm7Vr8PqBmElz4V9AnXSCTp7D+Cu4pfWsHopLUQ==
|
||||||
-----END AGE ENCRYPTED FILE-----
|
-----END AGE ENCRYPTED FILE-----
|
||||||
lastmodified: "2024-05-10T22:27:23Z"
|
lastmodified: "2024-05-21T00:38:43Z"
|
||||||
mac: ENC[AES256_GCM,data:pH8KM1JvO6OK1yGNT90kPfd7+zoUnyoTNfWhCXHBERzLmxHuI8VopCGfgxqYtjyBE4yYAIsRpzJBMPKSnazoL9EBWB+uoSE3UNXMgwTBK/Oq+aW1Bj7akOfCiR9U8yzgfqI7ReAtbioOVO3K/RlgCzpNFdfvToKwm7tUFrektB8=,iv:ltMnlbzIQumavl96q76sv9iYf4IgKrLS2yRZQ1xb83o=,tag:1PILpbzUR7LXaiuukrH3bw==,type:str]
|
mac: ENC[AES256_GCM,data:/Aq7fQaIQmaG67xqW1P1GMgh8FYSoerR+eLZFRWTjcOaa71ZBt7+a4RAGDqQuoXUYoTxn4bBUKQBBbseMA2Wep9Z5JhGDNtzxVJbLHqVxC8NjLKQUV/M8ycBgTGvxFqHhcTeBbYfoNBgvMsOZpUCe8Utf+Z6BdEAzaDfKkRfT7M=,iv:ndCIVUOLoolhe77wxdUFMXBTKyf21i4dRrKoxtLf92k=,tag:GRXhswxIktIj35p7cJWjKA==,type:str]
|
||||||
pgp: []
|
pgp: []
|
||||||
unencrypted_suffix: _unencrypted
|
unencrypted_suffix: _unencrypted
|
||||||
version: 3.8.1
|
version: 3.8.1
|
||||||
|
|
|
@ -1,16 +1,14 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
# {{{ Jupyterhub/lab env
|
||||||
let appEnv = pkgs.python3.withPackages (p: with p; [
|
let appEnv = pkgs.python3.withPackages (p: with p; [
|
||||||
jupyterhub
|
jupyterhub
|
||||||
jupyterlab
|
jupyterlab
|
||||||
jupyterhub-systemdspawner
|
jupyterhub-systemdspawner
|
||||||
jupyter-collaboration
|
jupyter-collaboration
|
||||||
]);
|
]);
|
||||||
|
# }}}
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
services.nginx.virtualHosts."jupyter.moonythm.dev" =
|
|
||||||
config.satellite.proxy
|
|
||||||
config.services.jupyterhub.port
|
|
||||||
{ proxyWebsockets = true; };
|
|
||||||
|
|
||||||
services.jupyterhub = {
|
services.jupyterhub = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -20,25 +18,24 @@ in
|
||||||
jupyterlabEnv = appEnv;
|
jupyterlabEnv = appEnv;
|
||||||
|
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
c.Authenticator.allowed_users = {'adrielus', 'prescientmoon'}
|
c.Authenticator.allowed_users = {'adrielus', 'javi'}
|
||||||
c.Authenticator.admin_users = {'adrielus', 'prescientmoon'}
|
c.Authenticator.admin_users = {'adrielus', 'javi'}
|
||||||
|
|
||||||
c.Spawner.notebook_dir='${config.users.users.pilot.home}/projects/notebooks'
|
c.Spawner.notebook_dir='${config.users.users.pilot.home}/projects/notebooks'
|
||||||
|
|
||||||
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 (pythonPackages: with pythonPackages; [
|
let env = (pkgs.python3.withPackages (p: with p; [
|
||||||
ipykernel
|
ipykernel
|
||||||
pandas
|
numpy
|
||||||
scikit-learn
|
scipy
|
||||||
]));
|
]));
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
displayName = "Python 3 for machine learning";
|
displayName = "Numerical mathematics setup";
|
||||||
argv = [
|
argv = [
|
||||||
"${env.interpreter}"
|
"${env.interpreter}"
|
||||||
"-m"
|
"-m"
|
||||||
|
@ -53,7 +50,23 @@ in
|
||||||
# }}}
|
# }}}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# {{{ Javi user
|
||||||
|
sops.secrets.javi_password = {
|
||||||
|
sopsFile = ../secrets.yaml;
|
||||||
|
neededForUsers = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
users.users.javi.hashedPasswordFile = config.sops.secrets.javi_password.path;
|
||||||
|
# }}}
|
||||||
|
# {{{ Networking
|
||||||
|
services.nginx.virtualHosts."jupyter.moonythm.dev" =
|
||||||
|
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