about summary refs log tree commit diff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--modules/common/common/nix/default.nix25
-rw-r--r--modules/common/common/nix/patches/vesktop-no-anime.patch17
-rw-r--r--modules/common/common/shell/default.nix4
-rw-r--r--modules/common/emacs/doom/config.el3
-rw-r--r--modules/common/emacs/doom/init.el1
-rw-r--r--modules/common/mpv.nix1
-rw-r--r--modules/common/qutebrowser.nix5
-rw-r--r--modules/nixos/beets.nix3
-rw-r--r--modules/nixos/common/nix.nix2
-rw-r--r--modules/nixos/firefox/default.nix1
-rw-r--r--modules/nixos/git/default.nix25
11 files changed, 66 insertions, 21 deletions
diff --git a/modules/common/common/nix/default.nix b/modules/common/common/nix/default.nix
index ab29039..8a684c5 100644
--- a/modules/common/common/nix/default.nix
+++ b/modules/common/common/nix/default.nix
@@ -4,6 +4,7 @@
   lib,
   localUsername ? lib.my.username,
   pkgs,
+  pkgsPr,
   this,
   ...
 }:
@@ -83,6 +84,7 @@ with lib; {
   nixpkgs.overlays = with inputs; [
     self.overlays.default
     nur.overlay
+    chaotic.overlays.default
     (
       _: super: {
         grc = super.grc.overrideAttrs (_: final: {
@@ -128,7 +130,7 @@ with lib; {
           });
 
         telegram-desktop =
-          (super.telegram-desktop.override (finalAttrs: {
+          (super.telegram-desktop_git.override (finalAttrs: {
             stdenv = pkgs.useMoldLinker finalAttrs.stdenv;
           }))
           .overrideAttrs (_: final: {
@@ -138,6 +140,27 @@ with lib; {
                 ./patches/telegram-desktop-no-ads.patch
               ];
           });
+
+        vesktop = (pkgsPr 263752 "sha256-LAWBE8au4ajSPPksF9rr3ddYCMctzx1FA75r2TCGbXc=").vesktop.overrideAttrs (_: final: {
+          nativeBuildInputs = final.nativeBuildInputs ++ [super.imagemagick];
+          patches =
+            final.patches
+            ++ [
+              ./patches/vesktop-no-anime.patch
+            ];
+          postInstall = ''
+            # Replace gay icons with the default one. Apparently, these were
+            # designed specifically for MacOS[1]. You can't make this shit up
+            # LMAO.
+            #
+            # [1]: https://github.com/Vencord/Vesktop/pull/48
+            rm -rf $out/share/icons/hicolor/*
+            for size in 16 24 32 48 64 96; do
+              convert -scale $size icon.png $size.png
+              install -Dm644 $size.png $out/share/icons/hicolor/''${size}x''${size}/apps/vencorddesktop.png
+            done
+          '';
+        });
       }
     )
   ];
diff --git a/modules/common/common/nix/patches/vesktop-no-anime.patch b/modules/common/common/nix/patches/vesktop-no-anime.patch
new file mode 100644
index 0000000..5fd97ef
--- /dev/null
+++ b/modules/common/common/nix/patches/vesktop-no-anime.patch
@@ -0,0 +1,17 @@
+diff --git i/static/views/splash.html w/static/views/splash.html
+index 7cb571b..519c0f6 100644
+--- i/static/views/splash.html
++++ w/static/views/splash.html
+@@ -30,12 +30,6 @@
+ 
+ <body>
+     <div class="wrapper">
+-        <img
+-            draggable="false"
+-            src="../shiggy.gif"
+-            alt="shiggy"
+-            role="presentation"
+-        />
+         <p>Loading Vesktop...</p>
+     </div>
+ </body>
diff --git a/modules/common/common/shell/default.nix b/modules/common/common/shell/default.nix
index be86bd8..c3c29de 100644
--- a/modules/common/common/shell/default.nix
+++ b/modules/common/common/shell/default.nix
@@ -31,6 +31,7 @@ with lib; {
         initExtra = ''
           set -o notify
 
+          # Apropriated from the default NixOS prompt settings.
           if [ "$TERM" != "dumb" ] || [ -n "$INSIDE_EMACS" ]; then
             PROMPT_COLOR="1;31m"
             ((UID)) && PROMPT_COLOR="1;32m"
@@ -46,9 +47,12 @@ with lib; {
 
           ${readFile ./functions.bash}
 
+          # Colourise certain programs' outputs.
           GRC_ALIASES=true
           source ${pkgs.grc}/etc/profile.d/grc.sh
 
+          # This makes sure we always source these tweaks for both interactive
+          # and login sessions.
           if [ -z "$_PROFILE_SOURCED" ] && [ -f "$HOME/.profile" ]; then
             source "$HOME/.profile"
           fi
diff --git a/modules/common/emacs/doom/config.el b/modules/common/emacs/doom/config.el
index 0000679..6095c40 100644
--- a/modules/common/emacs/doom/config.el
+++ b/modules/common/emacs/doom/config.el
@@ -26,7 +26,8 @@
 ;;; LSP
 ;;
 
-(setq lsp-enable-suggest-server-download nil)
+(setq lsp-enable-suggest-server-download nil
+      lsp-file-watch-threshold 512)
 
 ;;
 ;;; Org
diff --git a/modules/common/emacs/doom/init.el b/modules/common/emacs/doom/init.el
index 21b10c7..4399f05 100644
--- a/modules/common/emacs/doom/init.el
+++ b/modules/common/emacs/doom/init.el
@@ -77,6 +77,7 @@
        (cc +lsp +tree-sitter)
        (common-lisp +lsp +tree-sitter)
        data
+       (dhall +lsp +tree-sitter)
        (emacs-lisp +lsp +tree-sitter)
        (go +lsp +tree-sitter)
        (:if IS-LINUX (haskell +lsp +tree-sitter))
diff --git a/modules/common/mpv.nix b/modules/common/mpv.nix
index a44e9ca..37fbe4c 100644
--- a/modules/common/mpv.nix
+++ b/modules/common/mpv.nix
@@ -18,7 +18,6 @@ in {
           wrapMpv mpv-unwrapped {
             scripts = with mpvScripts; [
               autoload
-              mpv-autosub
               sponsorblock
             ];
           };
diff --git a/modules/common/qutebrowser.nix b/modules/common/qutebrowser.nix
index 9484ce1..e59917b 100644
--- a/modules/common/qutebrowser.nix
+++ b/modules/common/qutebrowser.nix
@@ -13,11 +13,6 @@ in {
     hm.programs.qutebrowser = with config.nixfiles.modules; {
       enable = true;
 
-      package = pkgs.qutebrowser.override {
-        withMediaPlayback = false;
-        withPdfReader = false;
-      };
-
       keyBindings.normal = mkIf mpv.enable {
         "z" = let
           mpv = "${config.hm.programs.mpv.package}/bin/mpv";
diff --git a/modules/nixos/beets.nix b/modules/nixos/beets.nix
index ccceaeb..f01e412 100644
--- a/modules/nixos/beets.nix
+++ b/modules/nixos/beets.nix
@@ -1,6 +1,7 @@
 {
   config,
   lib,
+  pkgs,
   ...
 }:
 with lib; let
@@ -27,6 +28,8 @@ in {
         beets = {
           enable = true;
 
+          package = pkgs.beets-unstable;
+
           settings = {
             library = "${beetsdir}/library.db";
             directory = config.userDirs.music;
diff --git a/modules/nixos/common/nix.nix b/modules/nixos/common/nix.nix
index c0061db..0caf265 100644
--- a/modules/nixos/common/nix.nix
+++ b/modules/nixos/common/nix.nix
@@ -14,6 +14,8 @@ in {
   };
 
   config = {
+    nix.settings.trusted-users = ["@wheel"];
+
     nixpkgs.config.allowUnfreePredicate = p: elem (getName p) cfg.allowedUnfreePackages;
 
     system.stateVersion = with builtins;
diff --git a/modules/nixos/firefox/default.nix b/modules/nixos/firefox/default.nix
index 2e24f23..e725e95 100644
--- a/modules/nixos/firefox/default.nix
+++ b/modules/nixos/firefox/default.nix
@@ -538,6 +538,7 @@ in {
             "browser.search.update" = false;
             "browser.tabs.closeWindowWithLastTab" = true;
             "browser.tabs.firefox-view" = false;
+            "browser.tabs.firefox-view-next" = false;
             "browser.tabs.inTitlebar" = 1;
             "browser.tabs.warnOnClose" = false;
             "browser.tabs.warnOnCloseOtherTabs" = false;
diff --git a/modules/nixos/git/default.nix b/modules/nixos/git/default.nix
index 9fb43db..4268f82 100644
--- a/modules/nixos/git/default.nix
+++ b/modules/nixos/git/default.nix
@@ -73,10 +73,10 @@ in {
             fastcgi_param QUERY_STRING $args;
             fastcgi_param HTTP_HOST $server_name;
 
-            # This makes `go get ...` work and adds analytics.
-            sub_filter '</head>'
-                '<meta name="go-import" content="$host$uri git https://$host$uri"><script defer data-domain="${cfg.server.domain}" src="https://plausible.shire.net/js/script.js"></script></head>';
-            sub_filter_once on;
+            ${nginxAppendHead [
+              ''<meta name="go-import" content="$host$uri git https://$host$uri">''
+              (htmlPlausibleScript {inherit (cfg.server) domain;})
+            ]}
           '';
           "~* ^.+(cgit.css|robots.txt)$".extraConfig = ''
             root ${cfg.server.package}/cgit;
@@ -88,16 +88,15 @@ in {
             alias ${./favicon.ico};
           '';
           "~* ^.+cgit-custom-style.css$".extraConfig = let
-            css = with config.colourScheme;
-              pkgs.writeText "custom.css" ''
-                @import url("cgit.css");
+            css = pkgs.writeText "custom.css" ''
+              @import url("cgit.css");
 
-                div#cgit {
-                  font-family: "${config.fontScheme.monospaceFont.family}", monospace;
-                  -moz-tab-size: 4;
-                  tab-size: 4;
-                }
-              '';
+              div#cgit {
+                font-family: "${config.fontScheme.monospaceFont.family}", monospace;
+                -moz-tab-size: 4;
+                tab-size: 4;
+              }
+            '';
           in ''
             alias ${css};
           '';

Consider giving Nix/NixOS a try! <3