jellyfin-qbittorrent-monitor: fix jellyfin api key file perms
This commit is contained in:
parent
097b89a14a
commit
ba6f47dde9
@ -39,10 +39,9 @@
|
|||||||
group = "caddy";
|
group = "caddy";
|
||||||
};
|
};
|
||||||
|
|
||||||
# TODO! fix permissions
|
|
||||||
jellyfin-api-key = {
|
jellyfin-api-key = {
|
||||||
file = ./secrets/jellyfin-api-key.age;
|
file = ./secrets/jellyfin-api-key.age;
|
||||||
mode = "0444";
|
mode = "0400";
|
||||||
owner = "root";
|
owner = "root";
|
||||||
group = "root";
|
group = "root";
|
||||||
};
|
};
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
ExecStart = pkgs.writeShellScript "jellyfin-monitor-start" ''
|
ExecStart = pkgs.writeShellScript "jellyfin-monitor-start" ''
|
||||||
export JELLYFIN_API_KEY=$(cat ${config.age.secrets.jellyfin-api-key.path})
|
export JELLYFIN_API_KEY=$(cat $CREDENTIALS_DIRECTORY/jellyfin-api-key)
|
||||||
exec ${
|
exec ${
|
||||||
pkgs.python3.withPackages (ps: with ps; [ requests ])
|
pkgs.python3.withPackages (ps: with ps; [ requests ])
|
||||||
}/bin/python ${./jellyfin-qbittorrent-monitor.py}
|
}/bin/python ${./jellyfin-qbittorrent-monitor.py}
|
||||||
@ -37,6 +37,9 @@
|
|||||||
RestrictRealtime = true;
|
RestrictRealtime = true;
|
||||||
RestrictSUIDSGID = true;
|
RestrictSUIDSGID = true;
|
||||||
RemoveIPC = true;
|
RemoveIPC = true;
|
||||||
|
|
||||||
|
# Load credentials from agenix secrets
|
||||||
|
LoadCredential = "jellyfin-api-key:${config.age.secrets.jellyfin-api-key.path}";
|
||||||
};
|
};
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user