summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--flake.lock53
-rw-r--r--hosts/navi/default.nix8
-rw-r--r--hosts/vps/default.nix1
-rw-r--r--hosts/vps/services/arXiv.nix41
-rw-r--r--hosts/vps/services/website.nix1
-rw-r--r--mixins/cli.nix3
-rw-r--r--mixins/firefox/default.nix3
-rw-r--r--mixins/multimedia.nix3
8 files changed, 71 insertions, 42 deletions
diff --git a/flake.lock b/flake.lock
index ece33dc..4daa910 100644
--- a/flake.lock
+++ b/flake.lock
@@ -49,11 +49,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1692199161,
-        "narHash": "sha256-GqKApvQ1JCf5DzH/Q+P4nwuHb6MaQGaWTu41lYzveF4=",
+        "lastModified": 1693905783,
+        "narHash": "sha256-ALIQLAzTJ6iy46U7tL62Nxd7247683kOR6TlSU6PXhU=",
         "owner": "nix-community",
         "repo": "disko",
-        "rev": "4eed2457b053c4bbad7d90d2b3a1d539c2c9009c",
+        "rev": "b2ea7d62581fa50d3e19a949b85fe04c1e8d7384",
         "type": "github"
       },
       "original": {
@@ -71,11 +71,11 @@
       },
       "locked": {
         "dir": "pkgs/firefox-addons",
-        "lastModified": 1692516032,
-        "narHash": "sha256-uHb5nfjwqJ1Hu6T4dmKZ26SheiUdHQlW0OEVHurez/8=",
+        "lastModified": 1693911773,
+        "narHash": "sha256-pYrkoEgXNHp43WAFJhUtr814tHWDLqITtzNpOvSfFz0=",
         "owner": "rycee",
         "repo": "nur-expressions",
-        "rev": "833fe10dfceca22fdf9cfd417f634736e5f3b993",
+        "rev": "64704beee52000f47146a7d96e4a167e10376099",
         "type": "gitlab"
       },
       "original": {
@@ -102,11 +102,11 @@
     },
     "hardware": {
       "locked": {
-        "lastModified": 1692373088,
-        "narHash": "sha256-EPgCecdc9I8aTdmDNoO1l7R72r2WPhZRcesV4nzxBj8=",
+        "lastModified": 1693718952,
+        "narHash": "sha256-+nGdJlgTk0MPN7NygopipmyylVuAVi7OItIwTlwtGnw=",
         "owner": "nixos",
         "repo": "nixos-hardware",
-        "rev": "7f1836531b126cfcf584e7d7d71bf8758bb58969",
+        "rev": "793de77d9f83418b428e8ba70d1e42c6507d0d35",
         "type": "github"
       },
       "original": {
@@ -143,11 +143,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1692503956,
-        "narHash": "sha256-MOA6FKc1YgfGP3ESnjSYfsyJ1BXlwV5pGlY/u5XdJfY=",
+        "lastModified": 1693895999,
+        "narHash": "sha256-yN1XVFltQxiwle833KCqWkZNfBuRLWkXyEnOD+ljoYY=",
         "owner": "nix-community",
         "repo": "home-manager",
-        "rev": "958c06303f43cf0625694326b7f7e5475b1a2d5c",
+        "rev": "3c0e381fef63e4fbc6c3292c9e9cbcf479c01794",
         "type": "github"
       },
       "original": {
@@ -178,11 +178,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1692503351,
-        "narHash": "sha256-FdG0wnizM9mAUgi58KP1tXaX4ogVooPDS6VwsGEqZ9s=",
+        "lastModified": 1693711723,
+        "narHash": "sha256-5QmlVzskLciJ0QzYmZ6ULvKA7bP6pgV9wwrLBB0V3j0=",
         "owner": "Mic92",
         "repo": "nix-index-database",
-        "rev": "4becac130db930e9de8c3fe58bfa245c119b9eeb",
+        "rev": "aca56a79afb82208af2b39d8459dd29c10989135",
         "type": "github"
       },
       "original": {
@@ -229,11 +229,11 @@
     },
     "nixpkgs_2": {
       "locked": {
-        "lastModified": 1692447944,
-        "narHash": "sha256-fkJGNjEmTPvqBs215EQU4r9ivecV5Qge5cF/QDLVn3U=",
+        "lastModified": 1693663421,
+        "narHash": "sha256-ImMIlWE/idjcZAfxKK8sQA7A1Gi/O58u5/CJA+mxvl8=",
         "owner": "NixOS",
         "repo": "nixpkgs",
-        "rev": "d680ded26da5cf104dd2735a51e88d2d8f487b4d",
+        "rev": "e56990880811a451abd32515698c712788be5720",
         "type": "github"
       },
       "original": {
@@ -243,22 +243,6 @@
         "type": "github"
       }
     },
-    "rizin-nixpkgs": {
-      "locked": {
-        "lastModified": 1691963731,
-        "narHash": "sha256-2zgxhN4Z6OPgrq7Ea+BgSc6RXhATclbxO1Gnjw1VIWk=",
-        "owner": "chayleaf",
-        "repo": "nixpkgs",
-        "rev": "c0f04a3fad5d1e5dc0043c9253428cb67ed5f3a2",
-        "type": "github"
-      },
-      "original": {
-        "owner": "chayleaf",
-        "ref": "rz-ghidra",
-        "repo": "nixpkgs",
-        "type": "github"
-      }
-    },
     "root": {
       "inputs": {
         "agenix": "agenix",
@@ -270,7 +254,6 @@
         "nix-index-database": "nix-index-database",
         "nixinate": "nixinate",
         "nixpkgs": "nixpkgs_2",
-        "rizin-nixpkgs": "rizin-nixpkgs",
         "viper-nix-common": "viper-nix-common"
       }
     },
diff --git a/hosts/navi/default.nix b/hosts/navi/default.nix
index 51e7d3a..c6d5db5 100644
--- a/hosts/navi/default.nix
+++ b/hosts/navi/default.nix
@@ -72,10 +72,10 @@
     #    Settings.AutoConnect = true;
     #  };
     #};
-    services.connman = {
-      enable = true;
-      #wifi.backend = "iwd";
-    };
+    #services.connman = {
+    #  enable = true;
+    #wifi.backend = "iwd";
+    #};
 
     # fucks up wpa_supplicant
     security.lockKernelModules = lib.mkForce false;
diff --git a/hosts/vps/default.nix b/hosts/vps/default.nix
index cfa50c7..7cd5f6c 100644
--- a/hosts/vps/default.nix
+++ b/hosts/vps/default.nix
@@ -13,6 +13,7 @@
     ./services/hydrus.nix
     ./services/matrix.nix
     ./services/maloja.nix
+    ./services/arXiv.nix
   ];
 
   config = {
diff --git a/hosts/vps/services/arXiv.nix b/hosts/vps/services/arXiv.nix
new file mode 100644
index 0000000..4e45a11
--- /dev/null
+++ b/hosts/vps/services/arXiv.nix
@@ -0,0 +1,41 @@
+{
+  pkgs,
+  config,
+  lib,
+  ...
+}: {
+  systemd.services.arXiv-randomizer = let
+    python = pkgs.python3.withPackages (ps:
+      with ps; [
+        beautifulsoup4
+        dateutil
+        numpy
+        flask
+        feedparser
+        gunicorn
+      ]);
+    arXiv-randomizer = builtins.fetchGit {
+      url = "https://git.tzlil.net/arXiv.git";
+      ref = "master";
+      rev = "d09927ca6f7af2404e9c3a09a6e99dfdd1e87577";
+    };
+  in {
+    after = ["network.target"];
+    wantedBy = ["multi-user.target"];
+    script = "${lib.getExe python} -m gunicorn -w 5 --log-level debug -b 0.0.0.0:3000 --timeout 90 app:app";
+    serviceConfig = {
+      Restart = "on-failure";
+      RestartSec = 0;
+      WorkingDirectory="${arXiv-randomizer}";
+    };
+  };
+
+  services.caddy = {
+    virtualHosts."tzlil.net".extraConfig = ''
+      redir /arXiv /arXiv/
+      handle_path /arXiv/* {
+        reverse_proxy :3000
+      }
+    '';
+  };
+}
diff --git a/hosts/vps/services/website.nix b/hosts/vps/services/website.nix
index 8f15df1..f3ef7b8 100644
--- a/hosts/vps/services/website.nix
+++ b/hosts/vps/services/website.nix
@@ -52,6 +52,7 @@
              <pre>
             <a href="https://fm.tzlil.net">fm.tzlil.net</a> music
             <a href="https://git.tzlil.net">git.tzlil.net</a> for everything im too embarrased to put on sourcehut
+            <a href="/arXiv">arXiv randomizer</a>
             </pre>
           ''} /
             file_server
diff --git a/mixins/cli.nix b/mixins/cli.nix
index ceb485b..ab01eb4 100644
--- a/mixins/cli.nix
+++ b/mixins/cli.nix
@@ -17,6 +17,7 @@
           curl
           ripgrep
           bat
+          jq
 
           # p2p file transfer
           croc
@@ -73,6 +74,7 @@
             gs = "git status";
             l = "ls -alh";
             b = "bat";
+            alv = "ping -c 1 -W 1";
           };
           functions = {
             fish_greeting = "";
@@ -86,6 +88,7 @@
             nr = "nix run nixpkgs#$argv[1] $argv[2..]";
             tmp = "cd (mktemp -d --suffix -$argv[1])";
             py = ''python -c "print(eval(\"\"\"$argv\"\"\"))"'';
+
             # fish_command_not_found = "nix shell nixpkgs#(command-not-found $argv[1] &| sed -nr 's/.*-p (.*)$/\\1/p' | ${lib.getExe pkgs.fzf} || return 0) -c $argv[1]";
           };
         };
diff --git a/mixins/firefox/default.nix b/mixins/firefox/default.nix
index 977de28..857162e 100644
--- a/mixins/firefox/default.nix
+++ b/mixins/firefox/default.nix
@@ -308,7 +308,7 @@ in
             builtins.readFile (
               builtins.fetchurl {
                 url = "https://raw.githubusercontent.com/arkenfox/user.js/master/user.js";
-                sha256 = "sha256:165c977fwncvrv0c8ddi633ckw97p3pkvjid5fj6j48smsv08axk";
+                sha256 = "sha256:0x0xkbhmb53lyfpbc8wmm44dgr4zrn15b2pc6gny08mh5j4ny8m7";
               }
             )
             + ''
@@ -392,7 +392,6 @@ in
               };
             })
             redirector
-            demodal
             kristofferhagen-nord-theme
             new-tab-override
 
diff --git a/mixins/multimedia.nix b/mixins/multimedia.nix
index 19528c7..0ced6f9 100644
--- a/mixins/multimedia.nix
+++ b/mixins/multimedia.nix
@@ -56,7 +56,8 @@
         };
         bindings = {
           # yank video link
-          "Shift+Y" = "run ${pkgs.writeShellScript "yank-mpv" "
+          "Shift+Y" = "run ${
+            pkgs.writeShellScript "yank-mpv" "
           ${pkgs.wl-clipboard}/bin/wl-copy $1"
           } \${path}";
           # yank video link with timestamp