2024-08-11 10:13:36 +00:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
config,
|
|
|
|
...
|
2024-08-25 15:02:35 +00:00
|
|
|
}:
|
|
|
|
{
|
2024-08-11 10:13:36 +00:00
|
|
|
services.pixivfe = {
|
|
|
|
enable = true;
|
|
|
|
EnvironmentFile = config.sops.secrets."pixivfe/environment".path;
|
|
|
|
settings = {
|
|
|
|
PIXIVFE_UNIXSOCKET = "/run/pixivfe/pixiv.sock";
|
|
|
|
PIXIVFE_IMAGEPROXY = "https://i.pixiv.re";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
systemd.services.pixivfe.serviceConfig = {
|
2024-08-25 15:02:35 +00:00
|
|
|
RuntimeDirectory = [ "pixivfe" ];
|
2024-08-11 10:13:36 +00:00
|
|
|
ExecStartPost = pkgs.writeShellScript "pixivfe-unixsocket" ''
|
|
|
|
${pkgs.coreutils}/bin/sleep 5
|
|
|
|
${pkgs.coreutils}/bin/chmod 777 /run/pixivfe/pixiv.sock
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|