tsuki/atuin: use socket activation

This commit is contained in:
Oystein Kristoffer Tveit 2023-10-06 13:43:24 +02:00
parent aca2962eec
commit 450d26cf4b
Signed by: oysteikt
GPG Key ID: 9F2F7D8250F35146
2 changed files with 12 additions and 2 deletions

View File

@ -1,4 +1,7 @@
{ ... }: { config, ... }:
let
cfg = config.services.atuin;
in
{ {
services.atuin = { services.atuin = {
enable = true; enable = true;
@ -42,4 +45,11 @@
UMask = "0007"; UMask = "0007";
}; };
}; };
local.socketActivation.atuin = {
enable = cfg.enable;
originalSocketAddress = "${cfg.host}:${toString cfg.port}";
newSocketAddress = "/run/atuin.sock";
privateNamespace = false;
};
} }

View File

@ -41,7 +41,7 @@
srv = config.services; srv = config.services;
sa = config.local.socketActivation; sa = config.local.socketActivation;
in { in {
"atuin".servers."localhost:${s srv.atuin.port}" = { }; "atuin".servers."unix:${sa.atuin.newSocketAddress}" = { };
"dynmap".servers."localhost:${s ports.minecraft.dynmap}" = { }; "dynmap".servers."localhost:${s ports.minecraft.dynmap}" = { };
"gitea".servers."unix:/run/gitea/gitea.sock" = { }; "gitea".servers."unix:/run/gitea/gitea.sock" = { };
"grafana".servers."unix:/run/grafana/grafana.sock" = { }; "grafana".servers."unix:/run/grafana/grafana.sock" = { };