tsuki/jupyter: use socket activation

This commit is contained in:
Oystein Kristoffer Tveit 2023-10-06 13:47:57 +02:00
parent 5bb10df9e1
commit 424fea0dc8
Signed by: oysteikt
GPG Key ID: 9F2F7D8250F35146
2 changed files with 13 additions and 2 deletions

View File

@ -8,7 +8,6 @@ in {
}; };
users.users."jupyter".group = "jupyter"; users.users."jupyter".group = "jupyter";
users.groups."jupyter".members = [ "nginx" ];
services.jupyter = { services.jupyter = {
enable = true; enable = true;
@ -95,4 +94,16 @@ in {
''; '';
}; };
}; };
local.socketActivation.jupyter = {
enable = cfg.enable;
originalSocketAddress = "/run/jupyter/jupyter.sock";
newSocketAddress = "/run/jupyter.sock";
privateNamespace = false;
};
systemd.services.jupyter-proxy.serviceConfig = {
User = "jupyter";
Group = "jupyter";
};
} }

View File

@ -50,7 +50,7 @@
"hydra".servers."localhost:${s srv.hydra.port}" = { }; "hydra".servers."localhost:${s srv.hydra.port}" = { };
"idrac".servers."${ips.idrac}" = { }; "idrac".servers."${ips.idrac}" = { };
"invidious".servers."localhost:${s config.services.invidious.port}" = { }; "invidious".servers."localhost:${s config.services.invidious.port}" = { };
"jupyter".servers."unix:/run/jupyter/jupyter.sock" = { }; "jupyter".servers."unix:${sa.jupyter.newSocketAddress}" = { };
"kanidm".servers."localhost:8300" = { }; "kanidm".servers."localhost:8300" = { };
"navidrome".servers."unix:${sa.navidrome.newSocketAddress}" = { }; "navidrome".servers."unix:${sa.navidrome.newSocketAddress}" = { };
"osuchan".servers."localhost:${s ports.osuchan}" = { }; "osuchan".servers."localhost:${s ports.osuchan}" = { };