summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--hosts/vps/default.nix14
-rw-r--r--hosts/vps/services/git.nix83
-rw-r--r--hosts/vps/services/website.nix89
-rw-r--r--mixins/firefox/absolute-minimum.nix3
-rw-r--r--mixins/firefox/default.nix17
5 files changed, 80 insertions, 126 deletions
diff --git a/hosts/vps/default.nix b/hosts/vps/default.nix
index 2c39141..87b195c 100644
--- a/hosts/vps/default.nix
+++ b/hosts/vps/default.nix
@@ -27,11 +27,19 @@
       extraModulePackages = [];
     };
 
-    networking.interfaces.ens3.useDHCP = lib.mkDefault true;
-
     time.timeZone = lib.mkDefault "Frankfurt";
 
-    networking.networkmanager.enable = lib.mkForce false;
+    systemd.network.networks."10-ens3" = {
+      matchConfig.Name = "ens3";
+      networkConfig.DHCP = "yes";
+      dns = ["127.0.0.1" "::1"];
+      dhcpV4Config = {
+        UseDNS = false;
+      };
+      ipv6AcceptRAConfig = {
+        UseDNS = false;
+      };
+    };
 
     nixpkgs.config.allowUnfree = true;
     environment.persistence."/nix/persist".directories = [
diff --git a/hosts/vps/services/git.nix b/hosts/vps/services/git.nix
index 8bd4653..b6006e2 100644
--- a/hosts/vps/services/git.nix
+++ b/hosts/vps/services/git.nix
@@ -32,52 +32,49 @@
         group = "fcgiwrap";
       };
       caddy = {
-        virtualHosts."tzlil.net".extraConfig = ''
+        virtualHosts."git.tzlil.net".extraConfig = ''
           bind 0.0.0.0
           ${config.website.defaultHeaders}
-          handle_path /cgit/* {
-            handle /cgit.png {
-              root * ${pkgs.cgit}/cgit
-              file_server
-            }
-            handle /cgit.css {
-              try_files ${pkgs.fetchurl {
-            url = "https://jeremias.stotter.eu/cgi-bin/cgit.cgi/cgit-dark/plain/cgit.css";
-            sha256 = "sha256-wqszujnWV5PRh3L23L1BFj/PKUElpyu1KhjqrHS8lCw=";
-          }} /
-              file_server
-            }
-            handle /favicon.ico {
-              root * ${pkgs.cgit}/cgit
-              file_server
-            }
-            handle {
-              reverse_proxy unix//run/fcgiwrap.sock {
-                transport fastcgi {
-                  env SCRIPT_FILENAME ${pkgs.cgit}/cgit/cgit.cgi
-                  env CGIT_CONFIG ${pkgs.writeText "cgitrc" (pkgs.lib.generators.toKeyValue {} {
-            css = "/cgit/cgit.css";
-            logo = "/cgit/cgit.png";
-            favicon = "/favicon.ico";
-            clone-url = pkgs.lib.concatStringsSep " " [
-              "http://$HTTP_HOST$SCRIPT_NAME/$CGIT_REPO_URL"
-              "ssh://git@tzlil.net:$CGIT_REPO_URL"
-            ];
-            enable-log-filecount = 1;
-            enable-log-linecount = 1;
-            enable-git-config = 1;
-            root-title = "tzlil.net";
-            root-desc = "Tzlil's Git Repositories";
-            scan-path = "/home/git";
-            about-filter = "${pkgs.cgit}/lib/cgit/filters/about-formatting.py";
-            source-filter = "${pkgs.cgit}/lib/cgit/filters/syntax-highlighting.py";
-            logo-link = "/";
-            virtual-root = "/cgit";
-            readme = ":README.md";
-          })}
-                }
-              }
+          handle_path /cgit.png {
+            try_files ${pkgs.cgit}/cgit/cgit.png /
+            file_server
           }
+          handle_path /cgit.css {
+            try_files ${pkgs.fetchurl {
+                url = "https://jeremias.stotter.eu/cgi-bin/cgit.cgi/cgit-dark/plain/cgit.css";
+                sha256 = "sha256-wqszujnWV5PRh3L23L1BFj/PKUElpyu1KhjqrHS8lCw=";
+            }} /
+            file_server
+          }
+          handle_path /favicon.ico {
+            try_files ${pkgs.cgit}/cgit/favicon.ico /
+            file_server
+          }
+          handle_path / {
+            reverse_proxy unix//run/fcgiwrap.sock {
+             transport fastcgi {
+               env SCRIPT_FILENAME ${pkgs.cgit}/cgit/cgit.cgi
+               env CGIT_CONFIG ${pkgs.writeText "cgitrc" (pkgs.lib.generators.toKeyValue {} {
+                  css = "/cgit.css";
+                  logo = "/cgit.png";
+                  favicon = "/favicon.ico";
+                  clone-url = pkgs.lib.concatStringsSep " " [
+                    "http://git.tzlil.net/$CGIT_REPO_URL"
+                    # "ssh://git@tzlil.net:$CGIT_REPO_URL"
+                  ];
+                  enable-log-filecount = 1;
+                  enable-log-linecount = 1;
+                  enable-git-config = 1;
+                  root-title = "tzlil.net";
+                  root-desc = "Tzlil's Git Repositories";
+                  scan-path = config.users.users.git.home;
+                  about-filter = "${pkgs.cgit}/lib/cgit/filters/about-formatting.py";
+                  source-filter = "${pkgs.cgit}/lib/cgit/filters/syntax-highlighting.py";
+                  logo-link = "/";
+                  readme = ":README.md";
+                })}
+             }
+            }
           }
         '';
       };
diff --git a/hosts/vps/services/website.nix b/hosts/vps/services/website.nix
index 05ea36f..75f33ae 100644
--- a/hosts/vps/services/website.nix
+++ b/hosts/vps/services/website.nix
@@ -42,85 +42,16 @@
           bind 0.0.0.0
           handle_path / {
             try_files ${pkgs.writeText "index.html" ''
-            <style>
-            @media (prefers-color-scheme: dark) {
-                body { background-color: #121212; color: #d4d4d4; }
-                a { color: #7878ff; }
-                a:visited { color: #6464fa; }
-            }
-            </style>
-            <pre>
-            ~?~+=I?~~IIIII++,:   .?= .,I=O8OZ.DNNO, ZD7:::=.? ,,:,,I,,:,~+?II?I?II?=+=~+7$ZO
-            ?==++??==+I???7..:.   :II$77?I+ID~NND8.ZMN7~=~I7:,., :?7,.,.~+?I???????,+~7+$ZOZ
-            7+===I+~===?I77:  ?   ,$7$.:.,I?=7NNNINMMMNOI=++ .~==I$7, ..++?I???I+=?.+:O+ZZOZ
-            ===++I+==?III??I,?,   ~I7NN,..  ??ONNNMMMD$777$7I$ZOO$7?....+=????I~=+,:+,O8DNMM
-            ~=~==7II=+I?II7I,I+,8Z.II8D+=~:.,7$NMMMMMN8$7~. ..  :88I. ..?=?++I:~+=.~~~NMMMNN
-            ~====II?I~+?I?$7I?~8D7+7$ZZNONDN8Z8NMMMMMMNNON:=. :,$.I7  .,+=??I:,=, .:,=DNNMMN
-            =+?==+==?~+=I?$$I+88D:I$8NMNDDNNNDNNNMMMMMMMMM8I$77=MMDO.  :~=+?,,,   .~,?8DDD8D
-            =~=+==I7I=IIIIO$=~OOD=I7ODNNNNMNNDNDNMMMMMMMMNO$O+OZ 78.,.I::++:..   .,::=888OOO
-            ===I=I?~=?I???$I$?OODZ=7Z8NDONNN7D88MMMMMMMMMMNNNN8DNN~..~:7,,+7?,:,:::+8=Z888OO
-            ~+===7?=??I????7Z7ZOD8I777$+NNN:OOZOMMMMMMMMMMMMMMNMM+..~=?=O:+?::=+~:~+IDD888OZ
-            I==II??=I???=::7OI?O88Z=I~,?ZDD,Z$IDMMMMMMMMMMMMMMMM:$$?.~?+=?:,~+?I??==+++I8OOO
-            ==+++??+=.,~,~:7Z$?7I77$=. $I$8I$7+~8NMMMMMMMMMMMMDDMN$ ,:+?=.~==?II+++=+=?II+OZ
-            ==+?+I?,=:+?=~~??I++~7$$$= 777Z,$Z$$ONNMMMMMMMMMMMMMM8? .~=?:.==+?I~+?=+=??II?I8
-            ?=+?I:=~??II=~~, II?+ 7$7?=?77$?$Z:8NMMMNMMMMMMMMMMMD7 ,,===::~=?II.??++?++III+~
-            ??+.I+I=+I+??=~=~ =I+:?7$77?$$$ZI7Z8DM7NMMNMMMMMMMMOI. .,=~~.~~+I?:???==~????II?
-            I??:==?I++I?~==+=~:.?I7I77$?IZ$ZODDOIDNNNNNMMMMNM8?.:. ,,+=,::~+==II=~,=?+?IIIII
-            ??I:?=,=+++?II+=:,:, +77777$$777ODDMMNO~DNNNDD8?..::: .,,+~.,::=??????=+?IIIII?I
-            ????++=~:=?IIIII=~:: ~~+II77$$7$ZO8NMMMND.+:   .=7+=~ ,,:?...~II??+??I?+??IIII?I
-            ??III7II+~:?II7+II?, ~,:,~7777$$$I$8DNMMNO   .~I  .Z:.,:~: ,+???+=,IIIIII??IIIII
-            ???I7I:,~=:,+II+=~I??:.,,,.:77777777$ODMM8 .:+ZI. ,~,..~~ :II?==~:?II??IIIIIIIII
-            No matter where you go, everyone's connected
-
-            my name is tzlil, i'm 18 and from israel
-            i currently work as a security researcher
-            but in a few months i will be drafted to the army
-
-            i like music <a href="https://fm.tzlil.net">https://fm.tzlil.net</a>
-
-	    15s english typing personal best: 205.4 wpm
-
-            my interests:
-            plan9
-            lambda calculus
-            functional programming
-            binary exploitation
-            keyboards and layouts
-            yggdrasil
-            nixos
-
-            my wares:
-            hard:
-              aurora lily58 with sunset kailh low profile
-              laptop(s):
-              - lenovo v14
-
-              phone:
-              - google pixel 7
-
-              OUT OF COMMISSION
-              <s>desktop:</s>
-              <s>- amd ryzen 5 5600g</s>
-
-            soft:
-              <a href="/cgit/flake.git">nixos</a>
-              keepassxc
-              syncthing
-              tailscale (to mesh between my devices)
-              grapheneos
-              <a href="/cgit/flake.git/tree/hosts/vps/hydrus.nix">hydrus</a>
-
-            ctfs i played in:
-              google ctf 2023 - 96th place (solo)
-              tfcctf 2022     - 4th place
-              google ctf 2022 - 100th place
-
-            contact info:
-            tzlil:tzlil.net
-            tzlils@protonmail.com
-            tzlil@irc.libera.chat
-
-            /cgit/ for repositories
+             <style>
+             @media (prefers-color-scheme: dark) {
+                 body { background-color: #121212; color: #d4d4d4; }
+                 a { color: #7878ff; }
+                 a:visited { color: #6464fa; }
+             }
+             </style>
+             <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
             </pre>
           ''} /
             file_server
diff --git a/mixins/firefox/absolute-minimum.nix b/mixins/firefox/absolute-minimum.nix
index 3a9eb9a..579df93 100644
--- a/mixins/firefox/absolute-minimum.nix
+++ b/mixins/firefox/absolute-minimum.nix
@@ -27,7 +27,8 @@ in
       addons = cfg.firefox.profiles.${profile}.extensions;
       extensionPath = "extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}";
 
-      extensionsData = pkgs.runCommand "extensions.json" {
+      extensionsData =
+        pkgs.runCommand "extensions.json" {
           buildInputs = [
             pkgs.xvfb-run
             pkgs.mozlz4a
diff --git a/mixins/firefox/default.nix b/mixins/firefox/default.nix
index 08233eb..977de28 100644
--- a/mixins/firefox/default.nix
+++ b/mixins/firefox/default.nix
@@ -284,6 +284,23 @@ in
                 iconUpdateURL = "https://invidious.io/favicon.ico";
                 definedAliases = ["!yt"];
               };
+
+              "Cyberchef" = {
+                urls = [
+                  {
+                    template = ''javascript:q="%s";location.href="https://cyberchef.org/#recipe=Magic(3,false,false,\'\')&input="+btoa(q)'';
+                    params = [
+                      {
+                        name = "q";
+                        value = "{searchTerms}";
+                      }
+                    ];
+                  }
+                ];
+
+                iconUpdateURL = "https://cyberchef.org/favicon.ico";
+                definedAliases = ["!cc"];
+              };
             };
           };