tsuki/invidious: use socket activation

This commit is contained in:
Oystein Kristoffer Tveit 2023-10-06 13:48:52 +02:00
parent 424fea0dc8
commit 3d613d1ac9
Signed by: oysteikt
GPG Key ID: 9F2F7D8250F35146
2 changed files with 11 additions and 3 deletions

View File

@ -1,5 +1,6 @@
{ config, ... }: { config, ... }: let
{ cfg = config.services.invidious;
in {
sops.secrets."postgres/invidious" = { sops.secrets."postgres/invidious" = {
restartUnits = [ "invidious.service" ]; restartUnits = [ "invidious.service" ];
}; };
@ -22,5 +23,12 @@
# popular_enabled = false; # popular_enabled = false;
}; };
}; };
local.socketActivation.invidious = {
enable = cfg.enable;
originalSocketAddress = "${cfg.settings.host_binding}:${toString cfg.port}";
newSocketAddress = "/run/invidious.sock";
privateNamespace = false;
};
} }

View File

@ -49,7 +49,7 @@
"hedgedoc".servers."unix:${srv.hedgedoc.settings.path}" = { }; "hedgedoc".servers."unix:${srv.hedgedoc.settings.path}" = { };
"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."unix:${sa.invidious.newSocketAddress}" = { };
"jupyter".servers."unix:${sa.jupyter.newSocketAddress}" = { }; "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}" = { };