From 4a5bc2d89d18a4313d2ebe70c666b57494014da8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Thu, 1 Dec 2022 13:39:16 +0100 Subject: [PATCH] feat: update to 22.11 --- .bin/ttrss-unread | 18 ++++++++++ flake.lock | 48 +++++++++++++------------- flake.nix | 2 +- systems/makanek/configuration.nix | 2 -- systems/makanek/gitea.nix | 6 ++-- systems/makanek/hedgedoc.nix | 2 +- systems/makanek/menstruation.nix | 8 ++++- systems/makanek/monitoring/default.nix | 8 +++-- systems/zaatar/configuration.nix | 2 +- 9 files changed, 61 insertions(+), 35 deletions(-) create mode 100755 .bin/ttrss-unread diff --git a/.bin/ttrss-unread b/.bin/ttrss-unread new file mode 100755 index 0000000..cda1319 --- /dev/null +++ b/.bin/ttrss-unread @@ -0,0 +1,18 @@ +#/usr/bin/env -S deno run -A:q +set -x +session_cache="$HOME/.cache/tt-rss.session" +ttrss_endpoint=https://feed.kmein.de/api/ +ttrss_user=k +ttrss_password=$(pass shared/tt-rss/password) + +login() { + if [ -f "$session_cache" ]; then + session_id="$(cat "$session_cache")" + else + session_id="$(curl -d '{"op":"login","user":"'"$ttrss_user"'","password":"'"$ttrss_password"'"}' "$ttrss_endpoint" | jq -r .content.session_id)" + echo "$session_id" > "$session_cache" + fi +} + +login +curl -d '{"sid":"'"$session_id"'","op":"getUnread"}' "$ttrss_endpoint" | jq .content diff --git a/flake.lock b/flake.lock index 0e9ba4c..fa04f10 100644 --- a/flake.lock +++ b/flake.lock @@ -23,11 +23,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1669510155, - "narHash": "sha256-PS2WdRXujfxH9PuH0w8aRmrEQ+Toz3RqGlp0mXQRGio=", + "lastModified": 1669825171, + "narHash": "sha256-HxlZHSiRGXnWAFbIJMeujqBe2KgACYx5XDRY0EA9P+4=", "owner": "nix-community", "repo": "home-manager", - "rev": "e999dfe7cba2e1fd59ab135e7496545bd4f82b76", + "rev": "478610aa37c8339eacabfa03f07dacf5574edd47", "type": "github" }, "original": { @@ -95,11 +95,11 @@ "nix-writers": { "flake": false, "locked": { - "lastModified": 1554228333, - "narHash": "sha256-hG/PlcCvCQhNcU55NpHfATkyH9k6cZmO7uvBoJjasXU=", + "lastModified": 1669756621, + "narHash": "sha256-Scg3pf+igUXt/YTO8kxQLBmBqCgGPVt/16DFC8YuA2g=", "ref": "refs/heads/master", - "rev": "c528cf970e292790b414b4c1c8c8e9d7e73b2a71", - "revCount": 32, + "rev": "f65c77bdcc58be2081a0ffbda849289c5191b5e8", + "revCount": 33, "type": "git", "url": "https://cgit.krebsco.de/nix-writers" }, @@ -110,27 +110,27 @@ }, "nixos-stable": { "locked": { - "lastModified": 1669418739, - "narHash": "sha256-T86oFvcUIRwHWBWUt7WjaP4BP/3lDGbv5AppQSI1FkI=", + "lastModified": 1669834992, + "narHash": "sha256-YnhZGHgb4C3Q7DSGisO/stc50jFb9F/MzHeKS4giotg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "695b3515251873e0a7e2021add4bba643c56cde3", + "rev": "596a8e828c5dfa504f91918d0fa4152db3ab5502", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-22.05", + "ref": "nixos-22.11", "repo": "nixpkgs", "type": "github" } }, "nixos-unstable": { "locked": { - "lastModified": 1669411043, - "narHash": "sha256-LfPd3+EY+jaIHTRIEOUtHXuanxm59YKgUacmSzaqMLc=", + "lastModified": 1669542132, + "narHash": "sha256-DRlg++NJAwPh8io3ExBJdNW7Djs3plVI5jgYQ+iXAZQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5dc7114b7b256d217fe7752f1614be2514e61bb8", + "rev": "a115bb9bd56831941be3776c8a94005867f316a7", "type": "github" }, "original": { @@ -143,11 +143,11 @@ "recht": { "flake": false, "locked": { - "lastModified": 1664353498, - "narHash": "sha256-s1MUaSOkyoAMarB4a1DgMsfVhmhAsLIjtyeT+ZCxOEE=", + "lastModified": 1669719044, + "narHash": "sha256-WsLWlTM2Hrurj9kVajybIOavV9QPYiJweMCOQR6h+YI=", "owner": "kmein", "repo": "recht", - "rev": "dc2cb407052a53965e6678fd84f0d887f887c11c", + "rev": "7c15b13328fb5cee01012c488ff235ee730cac70", "type": "github" }, "original": { @@ -159,11 +159,11 @@ "retiolum": { "flake": false, "locked": { - "lastModified": 1669363981, - "narHash": "sha256-MkcI5WZ1VGmXR9LsX9oTJJLSF36L871lX25jT0Ruklw=", + "lastModified": 1669747977, + "narHash": "sha256-Z2hlu8wMZK7oiVCKQEOV4pGZMgZNzIk8KKWEki/gNC0=", "owner": "krebs", "repo": "retiolum", - "rev": "a805971ef7e25d2cc1ce8a062e5f72617880402a", + "rev": "c6ba5338fe4edc1173a0b0245c7e536d83145475", "type": "github" }, "original": { @@ -211,11 +211,11 @@ "stockholm": { "flake": false, "locked": { - "lastModified": 1669306514, - "narHash": "sha256-bHhys4UdNC2rvg8RHL3BHR5uXv1Z0jxcQb/V7Wavhfk=", + "lastModified": 1669756706, + "narHash": "sha256-M4Aj6NoYvS6u/52U+cM4yWdpnbdJQ4k1d4u0yrCUY8Y=", "ref": "refs/heads/master", - "rev": "dae12b6893a1d28e8bcb1fe3fb9ee8757bbfbed4", - "revCount": 10963, + "rev": "81b5682c5ff1e36613f844a874e09b897ee13d3e", + "revCount": 10973, "type": "git", "url": "https://cgit.lassul.us/stockholm" }, diff --git a/flake.nix b/flake.nix index 595dc1f..105bc36 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ description = "niveum: packages, modules, systems"; inputs = { - nixos-stable.url = "github:NixOS/nixpkgs/nixos-22.05"; + nixos-stable.url = "github:NixOS/nixpkgs/nixos-22.11"; nixos-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; flake-utils.url = "github:numtide/flake-utils"; diff --git a/systems/makanek/configuration.nix b/systems/makanek/configuration.nix index 0424379..32d3bbb 100644 --- a/systems/makanek/configuration.nix +++ b/systems/makanek/configuration.nix @@ -10,10 +10,8 @@ in { ./gitea.nix ./hardware-configuration.nix ./hedgedoc.nix - ./matterbridge.nix ./menstruation.nix ./moinbot.nix - # ./horoscopy.nix ./monitoring ./moodle-dl-borsfaye.nix ./names.nix diff --git a/systems/makanek/gitea.nix b/systems/makanek/gitea.nix index 72a4821..59f62b0 100644 --- a/systems/makanek/gitea.nix +++ b/systems/makanek/gitea.nix @@ -4,10 +4,12 @@ let in { services.gitea = { enable = true; - disableRegistration = true; rootUrl = domain; appName = "code.kmein.de"; - ssh.clonePort = sshPort; + settings = { + server.SSH_PORT = sshPort; + service.DISABLE_REGISTRATION = true; + }; }; services.nginx.virtualHosts."code.kmein.de" = { forceSSL = true; diff --git a/systems/makanek/hedgedoc.nix b/systems/makanek/hedgedoc.nix index 25bbeac..b74038f 100644 --- a/systems/makanek/hedgedoc.nix +++ b/systems/makanek/hedgedoc.nix @@ -27,7 +27,7 @@ in { services.hedgedoc = { enable = true; - configuration = { + settings = { allowOrigin = [domain]; allowAnonymous = true; allowGravatar = false; diff --git a/systems/makanek/menstruation.nix b/systems/makanek/menstruation.nix index 6f10ef3..10a8bdd 100644 --- a/systems/makanek/menstruation.nix +++ b/systems/makanek/menstruation.nix @@ -4,7 +4,13 @@ ... }: let backend = pkgs.callPackage {}; - telegram = pkgs.callPackage {}; + old-pkgs = import (pkgs.fetchFromGitHub { + owner = "NixOs"; + repo = "nixpkgs"; + rev = "695b3515251873e0a7e2021add4bba643c56cde3"; + hash = "sha256-T86oFvcUIRwHWBWUt7WjaP4BP/3lDGbv5AppQSI1FkI="; + }) {}; + telegram = old-pkgs.poetry2nix.mkPoetryApplication {projectDir = ;}; backendPort = 8000; in { services.redis.servers.menstruation = { diff --git a/systems/makanek/monitoring/default.nix b/systems/makanek/monitoring/default.nix index 0dba662..8b2a741 100644 --- a/systems/makanek/monitoring/default.nix +++ b/systems/makanek/monitoring/default.nix @@ -10,9 +10,11 @@ in { services.grafana = { enable = true; - domain = "grafana.kmein.r"; - port = 9444; - addr = "127.0.0.1"; + settings.server = { + domain = "grafana.kmein.r"; + http_port = 9444; + http_addr = "127.0.0.1"; + }; }; services.nginx.virtualHosts.${config.services.grafana.domain} = { diff --git a/systems/zaatar/configuration.nix b/systems/zaatar/configuration.nix index 05b58ed..75c6e24 100644 --- a/systems/zaatar/configuration.nix +++ b/systems/zaatar/configuration.nix @@ -24,7 +24,7 @@ in { - + #