about summary refs log tree commit diff
path: root/modules/common
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2023-10-29 15:43:07 +0300
committerAzat Bahawi <azat@bahawi.net>2023-10-29 15:43:07 +0300
commit26125aac992416df8a3fd1f860aabcf6a37380ba (patch)
tree11ecb98248812a2b8392f3a879199835a55e9ee6 /modules/common
parent2023-10-25 (diff)
2023-10-29
Diffstat (limited to 'modules/common')
-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
7 files changed, 48 insertions, 8 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";

Consider giving Nix/NixOS a try! <3