mirror of
https://github.com/kmein/niveum
synced 2026-03-22 04:41:07 +01:00
feat(tarot): use scriptFile option
This commit is contained in:
8
flake.lock
generated
8
flake.lock
generated
@@ -211,11 +211,11 @@
|
|||||||
"stockholm": {
|
"stockholm": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1669968392,
|
"lastModified": 1670868652,
|
||||||
"narHash": "sha256-yXdKNYrOFpueTu6lFpm624rVri4rK6ad4qJqoUkc9vY=",
|
"narHash": "sha256-Y5kEs6GsKMvkLe+q+rAQDTIpLwmbt51lB07JLGbi4f8=",
|
||||||
"ref": "refs/heads/master",
|
"ref": "refs/heads/master",
|
||||||
"rev": "645c3564f75589531abcf17fd3c3f920d93a394a",
|
"rev": "3884243448869bdf09f6434b385e532c7c26ae88",
|
||||||
"revCount": 10987,
|
"revCount": 11077,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://cgit.lassul.us/stockholm"
|
"url": "https://cgit.lassul.us/stockholm"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -20,8 +20,7 @@ in {
|
|||||||
krebs.htgen.tarot = {
|
krebs.htgen.tarot = {
|
||||||
port = tarotPort;
|
port = tarotPort;
|
||||||
user.name = "radio";
|
user.name = "radio";
|
||||||
script = ''. ${
|
scriptFile = pkgs.writers.writeDash "tarot" ''
|
||||||
pkgs.writers.writeDash "tarot" ''
|
|
||||||
case "$Method $Request_URI" in
|
case "$Method $Request_URI" in
|
||||||
"GET /")
|
"GET /")
|
||||||
if item=$(${pkgs.findutils}/bin/find ${toString tarotFiles} -type f | ${pkgs.coreutils}/bin/shuf -n1); then
|
if item=$(${pkgs.findutils}/bin/find ${toString tarotFiles} -type f | ${pkgs.coreutils}/bin/shuf -n1); then
|
||||||
@@ -44,8 +43,7 @@ in {
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
''
|
'';
|
||||||
}'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
niveum.passport.services = [
|
niveum.passport.services = [
|
||||||
|
|||||||
Reference in New Issue
Block a user