From 01c1dc62f78f194537706e7d18c3addeb98f77b6 Mon Sep 17 00:00:00 2001 From: rrr-marble Date: Wed, 14 Feb 2024 17:09:21 +0000 Subject: [PATCH] msc: update mnotify --- .gitignore | 3 ++ app/__init__.py | 0 app/main.py | 4 +- flake.lock | 136 ++++++++++++++++-------------------------------- flake.nix | 3 +- 5 files changed, 52 insertions(+), 94 deletions(-) create mode 100644 .gitignore create mode 100644 app/__init__.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fd7ffeb --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*/__pycache__/ + +/result diff --git a/app/__init__.py b/app/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/app/main.py b/app/main.py index 946b6d5..af26735 100644 --- a/app/main.py +++ b/app/main.py @@ -42,10 +42,10 @@ async def sms(sms: Sms): "mn", "send", "--room-id", - os.environ["MATRIX_ROOM_ID"], + os.environ.get("MATRIX_ROOM_ID") or "!zHY4LWpsImzEPOXZrR:iamonlyherefortheicecream.ml", sms.model_dump_json(), ], - env={"MN_NO_KEYRING": "1", "XDG_STATE_HOME": "/srv"}, + env={"MN_NO_KEYRING": "1", "XDG_STATE_HOME": "/srv", "MN_SERVER_NAME": os.environ.get("MN_SERVER_NAME") or "matrix.rerd.eu"}, check=True, ) return sms diff --git a/flake.lock b/flake.lock index 3ce78f5..6f6e4a4 100644 --- a/flake.lock +++ b/flake.lock @@ -5,11 +5,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1701680307, - "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", + "lastModified": 1705309234, + "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", "owner": "numtide", "repo": "flake-utils", - "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", + "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", "type": "github" }, "original": { @@ -23,11 +23,11 @@ "systems": "systems_2" }, "locked": { - "lastModified": 1701680307, - "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", + "lastModified": 1705309234, + "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", "owner": "numtide", "repo": "flake-utils", - "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", + "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", "type": "github" }, "original": { @@ -40,24 +40,6 @@ "inputs": { "systems": "systems_3" }, - "locked": { - "lastModified": 1681202837, - "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "cfacdce06f30d2b68473a46042957675eebb3401", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_4": { - "inputs": { - "systems": "systems_4" - }, "locked": { "lastModified": 1694529238, "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", @@ -75,22 +57,44 @@ "mnotify": { "inputs": { "flake-utils": "flake-utils_2", + "naersk": "naersk", "nixpkgs": [ "nixpkgs" - ], - "rust-overlay": "rust-overlay" + ] }, "locked": { - "dirtyRev": "bcc13a6d5afc2adaab8693461f77730425eb5df3-dirty", - "dirtyShortRev": "bcc13a6-dirty", - "lastModified": 1685642190, - "narHash": "sha256-fN5LCFyCuQnoXd6ui2HSF50HZbJhtbwtWWnJwmMHGeQ=", + "lastModified": 1707925615, + "narHash": "sha256-9pPRsEXtIYJ5XbioBujt9izRcOa9WDdl5Q9v0X0WDYQ=", + "ref": "refs/heads/mine3", + "rev": "ee25021b9b1859da15227efbc001504fc90e972e", + "revCount": 149, "type": "git", - "url": "file:///home/rrr/prgr/tasting/mnotify" + "url": "file:../tasting/mnotify" }, "original": { "type": "git", - "url": "file:///home/rrr/prgr/tasting/mnotify" + "url": "file:../tasting/mnotify" + } + }, + "naersk": { + "inputs": { + "nixpkgs": [ + "mnotify", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1698420672, + "narHash": "sha256-/TdeHMPRjjdJub7p7+w55vyABrsJlt5QkznPYy55vKA=", + "owner": "nix-community", + "repo": "naersk", + "rev": "aeb58d5e8faead8980a807c840232697982d47b9", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "naersk", + "type": "github" } }, "nix-github-actions": { @@ -116,27 +120,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1681358109, - "narHash": "sha256-eKyxW4OohHQx9Urxi7TQlFBTDWII+F+x2hklDOQPB50=", + "lastModified": 1707786466, + "narHash": "sha256-yLPfrmW87M2qt+8bAmwopJawa+MJLh3M9rUbXtpUc1o=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "96ba1c52e54e74c3197f4d43026b3f3d92e83ff9", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1702921762, - "narHash": "sha256-O/rP7gulApQAB47u6szEd8Pn8Biw0d84j5iuP2tcxzY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "d02ffbbe834b5599fc5f134e644e49397eb07188", + "rev": "01885a071465e223f8f68971f864b15829988504", "type": "github" }, "original": { @@ -148,20 +136,20 @@ }, "poetry2nix": { "inputs": { - "flake-utils": "flake-utils_4", + "flake-utils": "flake-utils_3", "nix-github-actions": "nix-github-actions", "nixpkgs": [ "nixpkgs" ], - "systems": "systems_5", + "systems": "systems_4", "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1702591455, - "narHash": "sha256-vK54IZysaxuUOe+abJO0wD40bxqwfZ2aBOhUWS/O/oA=", + "lastModified": 1707195113, + "narHash": "sha256-xPFxTMe4rKE/ZWLlOWv22qpGwpozpR+U1zhyf1040Zk=", "owner": "nix-community", "repo": "poetry2nix", - "rev": "9d9d434528404a22fb0c8283fea1ea3a7410ff80", + "rev": "4eb2ac54029af42a001c9901194e9ce19cbd8a40", "type": "github" }, "original": { @@ -174,29 +162,10 @@ "inputs": { "flake-utils": "flake-utils", "mnotify": "mnotify", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs", "poetry2nix": "poetry2nix" } }, - "rust-overlay": { - "inputs": { - "flake-utils": "flake-utils_3", - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1702779466, - "narHash": "sha256-IZeGwmm5n6bn+f4aEwMdbzFsJaa219efYZass7pdNdg=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "d74fd31da8994c7e60850561a64379324c1c77dd", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, "systems": { "locked": { "lastModified": 1681028828, @@ -243,21 +212,6 @@ } }, "systems_4": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_5": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", diff --git a/flake.nix b/flake.nix index e5d9f72..388e591 100644 --- a/flake.nix +++ b/flake.nix @@ -9,7 +9,7 @@ inputs.nixpkgs.follows = "nixpkgs"; }; mnotify = { - url = "/home/rrr/prgr/tasting/mnotify"; + url = "git+file:../tasting/mnotify"; inputs.nixpkgs.follows = "nixpkgs"; }; }; @@ -36,6 +36,7 @@ default.dependencyEnv mnotify.packages.${system}.default pkgs.dockerTools.fakeNss # for mnotify + pkgs.cacert (pkgs.lib.fileset.toSource { root = ./.;