mirror of
https://github.com/kmein/niveum
synced 2026-03-22 21:01:07 +01:00
Compare commits
1 Commits
734f108200
...
4c84da9404
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4c84da9404 |
30
flake.lock
generated
30
flake.lock
generated
@@ -1109,11 +1109,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-unstable_2": {
|
"nixpkgs-unstable_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1748739301,
|
"lastModified": 1748134661,
|
||||||
"narHash": "sha256-McRTdxeCGaZUw4NOERKy1E1ABry3EktuWCczZND+7MM=",
|
"narHash": "sha256-p4cM3XaeN7YLMw4dSRCIZwXPxOS1SelqxPBUNs0IF6A=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "e1223687f8c41922f384760c87d0e6c0a2fc5c86",
|
"rev": "81e63461fb905af981fcb99057a845a930999eaa",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -1231,11 +1231,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_7": {
|
"nixpkgs_7": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1748421225,
|
"lastModified": 1747862697,
|
||||||
"narHash": "sha256-XXILOc80tvlvEQgYpYFnze8MkQQmp3eQxFbTzb3m/R0=",
|
"narHash": "sha256-U4HaNZ1W26cbOVm0Eb5OdGSnfQVWQKbLSPrSSa78KC0=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "78add7b7abb61689e34fc23070a8f55e1d26185b",
|
"rev": "2baa12ff69913392faf0ace833bc54bba297ea95",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -1247,11 +1247,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_8": {
|
"nixpkgs_8": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1748460289,
|
"lastModified": 1748026106,
|
||||||
"narHash": "sha256-7doLyJBzCllvqX4gszYtmZUToxKvMUrg45EUWaUYmBg=",
|
"narHash": "sha256-6m1Y3/4pVw1RWTsrkAK2VMYSzG4MMIj7sqUy7o8th1o=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "96ec055edbe5ee227f28cdbc3f1ddf1df5965102",
|
"rev": "063f43f2dbdef86376cc29ad646c45c46e93234c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -1395,11 +1395,11 @@
|
|||||||
"treefmt-nix": "treefmt-nix"
|
"treefmt-nix": "treefmt-nix"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1748730660,
|
"lastModified": 1748124399,
|
||||||
"narHash": "sha256-5LKmRYKdPuhm8j5GFe3AfrJL8dd8o57BQ34AGjJl1R0=",
|
"narHash": "sha256-AWYa6QSgYbd0YiOecaTyJ78XSHcLI7yljdSpBTQWB+8=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NUR",
|
"repo": "NUR",
|
||||||
"rev": "2c0bc52fe14681e9ef60e3553888c4f086e46ecb",
|
"rev": "d8bccb87461726979bc4fe9facbdfa0739fe24a2",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -1568,11 +1568,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1748658947,
|
"lastModified": 1748054080,
|
||||||
"narHash": "sha256-F+nGITu6D7RswJlm8qCuU1PCuOSgDeAqaDKWW1n1jmQ=",
|
"narHash": "sha256-rwFiLLNCwkj9bqePtH1sMqzs1xmohE0Ojq249piMzF4=",
|
||||||
"owner": "oxalica",
|
"owner": "oxalica",
|
||||||
"repo": "rust-overlay",
|
"repo": "rust-overlay",
|
||||||
"rev": "fc82ce758cc5df6a6d5d24e75710321cdbdc787a",
|
"rev": "2221d8d53c128beb69346fa3ab36da3f19bb1691",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ in {
|
|||||||
./radio.nix
|
./radio.nix
|
||||||
./panoptikon.nix
|
./panoptikon.nix
|
||||||
./hledger.nix
|
./hledger.nix
|
||||||
./wallabag.nix
|
|
||||||
./alew.nix
|
./alew.nix
|
||||||
../../configs/monitoring.nix
|
../../configs/monitoring.nix
|
||||||
../../configs/mycelium.nix
|
../../configs/mycelium.nix
|
||||||
|
|||||||
@@ -1,44 +0,0 @@
|
|||||||
{ pkgs, config, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
domain = "pocket.kmein.de";
|
|
||||||
port = "8088";
|
|
||||||
dataPath = "/var/lib/wallabag";
|
|
||||||
in
|
|
||||||
{
|
|
||||||
services.nginx.virtualHosts.${domain} = {
|
|
||||||
enableACME = true;
|
|
||||||
forceSSL = true;
|
|
||||||
locations."/" = {
|
|
||||||
proxyPass = "http://127.0.0.1:${port}";
|
|
||||||
proxyWebsockets = true;
|
|
||||||
};
|
|
||||||
extraConfig = ''
|
|
||||||
client_body_timeout 3000s;
|
|
||||||
client_header_timeout 3000s;
|
|
||||||
keepalive_timeout 3000s;
|
|
||||||
proxy_read_timeout 3000s;
|
|
||||||
proxy_connect_timeout 3000s;
|
|
||||||
proxy_send_timeout 3000s;
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
services.restic.backups.niveum.paths = [ dataPath ];
|
|
||||||
|
|
||||||
virtualisation.oci-containers.containers."${domain}" = {
|
|
||||||
autoStart = true;
|
|
||||||
image = "wallabag/wallabag:2.6.12";
|
|
||||||
ports = [ "${port}:80" ];
|
|
||||||
volumes = [
|
|
||||||
"${dataPath}/data:/var/www/wallabag/data"
|
|
||||||
"${dataPath}/images:/var/www/wallabag/web/assets/images"
|
|
||||||
];
|
|
||||||
environment = {
|
|
||||||
SYMFONY__ENV__DOMAIN_NAME = "https://${domain}";
|
|
||||||
SYMFONY__ENV__FOSUSER_CONFIRMATION = "false";
|
|
||||||
PHP_MEMORY_LIMIT = "512M";
|
|
||||||
SYMFONY__ENV__SERVER_NAME = "Wallabag";
|
|
||||||
};
|
|
||||||
extraOptions = [ "--pull=always" ];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -23,24 +23,20 @@ in {
|
|||||||
startAt = "*:50";
|
startAt = "*:50";
|
||||||
script = ''
|
script = ''
|
||||||
set -efu
|
set -efu
|
||||||
PATH=$PATH:${lib.makeBinPath [pkgs.w3m pkgs.gnused pkgs.curl pkgs.jq pkgs.yq]}
|
PATH=$PATH:${lib.makeBinPath [pkgs.w3m pkgs.gnused pkgs.curl pkgs.jq]}
|
||||||
|
|
||||||
export GEMINI_API_KEY="$(cat "$CREDENTIALS_DIRECTORY/gemini-api-key")"
|
export GEMINI_API_KEY="$(cat "$CREDENTIALS_DIRECTORY/gemini-api-key")"
|
||||||
|
|
||||||
EVENTS=$(
|
WIKI_URL="https://en.wikipedia.org/wiki/Portal:Current_events"
|
||||||
curl https://www.goodnewsnetwork.org/feed/ \
|
|
||||||
| xq '
|
EVENTS=$(w3m -dump "$WIKI_URL" | sed -n "/$(date -I)/,/$(date -I -d yesterday)/p" | head -n -1)
|
||||||
.rss.channel.item
|
|
||||||
| map(select((.pubDate|strptime("%a, %d %b %Y %H:%M:%S %z")) as $date | ($date | mktime) > (now - (60 * 60 * 24))) | {title, description})
|
|
||||||
'
|
|
||||||
)
|
|
||||||
|
|
||||||
SYSTEM_PROMPT=$(cat <<EOF
|
SYSTEM_PROMPT=$(cat <<EOF
|
||||||
You are a news anchor writing a short news digest for a radio broadcast.
|
You are a news anchor writing a short news digest for a radio broadcast.
|
||||||
Summarize the following news headlines into a cohesive, engaging script under 400 words.
|
Summarize the following news headlines into a cohesive, engaging script under 400 words.
|
||||||
Keep it professional, concise, and easy to follow.
|
Keep it professional, concise, and easy to follow.
|
||||||
|
|
||||||
Begin the digest with: "Here's your good news update for $(date -u +"%B %d, %Y")."
|
Begin the digest with: "Here's your news update for $(date -u +"%B %d, %Y")."
|
||||||
EOF
|
EOF
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -57,7 +53,8 @@ in {
|
|||||||
{
|
{
|
||||||
"parts": [
|
"parts": [
|
||||||
{
|
{
|
||||||
"text": $(jq -Rs <<< "$EVENTS")
|
"text": "Current events (from Wikipedia): $(echo "$EVENTS")"
|
||||||
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user