about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2022-09-01 14:22:34 +0300
committerAzat Bahawi <azat@bahawi.net>2022-09-01 14:22:34 +0300
commita9eaf09572e57a48d96e02796ed16427c02a50c3 (patch)
tree26552af5cccf339c1e805bc9f47ae5e8b36048d9
parent2022-08-28 (diff)
2022-09-01
-rw-r--r--flake.lock48
-rw-r--r--modules/nixfiles/emacs/doom/config.el207
-rw-r--r--modules/nixfiles/emacs/doom/packages.el12
-rw-r--r--modules/nixfiles/firefox/userContent.css50
4 files changed, 193 insertions, 124 deletions
diff --git a/flake.lock b/flake.lock
index 98e42ce..0a25bd1 100644
--- a/flake.lock
+++ b/flake.lock
@@ -121,11 +121,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1661598612,
-        "narHash": "sha256-0W31cSC+ggoP8kxN0Hn8HWd0wK37hLx4ul7IO4gKztE=",
+        "lastModified": 1661856816,
+        "narHash": "sha256-pb/Xu1p5q3xtk5nxBj25eoeM02SFSQ53FjSBqT+FNhE=",
         "owner": "nix-community",
         "repo": "emacs-overlay",
-        "rev": "d8891991eef88a53a979ff242663429cef82a094",
+        "rev": "b726259df1d6defe5af8c5be45ff6457885f2a5f",
         "type": "github"
       },
       "original": {
@@ -328,11 +328,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1661573386,
-        "narHash": "sha256-pBEg8iY00Af/SAtU2dlmOAv+2x7kScaGlFRDjNoVJO8=",
+        "lastModified": 1661824092,
+        "narHash": "sha256-nSWLWytlXbeLrx5A+r5Pso7CvVrX5EgmIIXW/EXvPHQ=",
         "owner": "nix-community",
         "repo": "home-manager",
-        "rev": "d89bdff445eadff03fe414e9c30486bc8166b72b",
+        "rev": "5bd66dc6cd967033489c69d486402b75d338eeb6",
         "type": "github"
       },
       "original": {
@@ -401,11 +401,11 @@
         ]
       },
       "locked": {
-        "lastModified": 1661565271,
-        "narHash": "sha256-GTa5fSSifG57cDaklJfVj4MpWl/1vqiSPu4My2wLkVc=",
+        "lastModified": 1661824817,
+        "narHash": "sha256-rKKTjwIVRD5YyD4/X0HMgQkPunAI1rb9vwP2l3M7NWY=",
         "owner": "jyooru",
         "repo": "nix-minecraft-servers",
-        "rev": "4724b9ab810125bc71dbbeca22237532cb61831b",
+        "rev": "835355ef3f51f9ba1a75a35315f997b189337d81",
         "type": "github"
       },
       "original": {
@@ -449,11 +449,11 @@
     },
     "nixpkgs": {
       "locked": {
-        "lastModified": 1661336769,
-        "narHash": "sha256-5Sf9tMd1Jdm+lTBGspbQ4kEoYCDKpUhEVAZHRcm6mGU=",
+        "lastModified": 1661353537,
+        "narHash": "sha256-1E2IGPajOsrkR49mM5h55OtYnU0dGyre6gl60NXKITE=",
         "owner": "NixOS",
         "repo": "nixpkgs",
-        "rev": "03428dbaaa23d6bf458770907b0927b377c873a8",
+        "rev": "0e304ff0d9db453a4b230e9386418fd974d5804a",
         "type": "github"
       },
       "original": {
@@ -465,11 +465,11 @@
     },
     "nixpkgs-endlessh-go": {
       "locked": {
-        "lastModified": 1661682252,
-        "narHash": "sha256-Hj1leGuWEWmf4Oq9XUUDJ8R/YijhHlnd9P/C4v7UwmA=",
+        "lastModified": 1661766727,
+        "narHash": "sha256-4K3q+YOG2wpx+aighjiuxWFdgNb08YLhQSbJNC07tVY=",
         "owner": "azahi",
         "repo": "nixpkgs",
-        "rev": "3242f1f7dd92e1fd517909c0cb0b0fce4e43f02a",
+        "rev": "157111fe56e266928b46d88d3c14e7b9a2624385",
         "type": "github"
       },
       "original": {
@@ -481,11 +481,11 @@
     },
     "nixpkgs-master": {
       "locked": {
-        "lastModified": 1661601515,
-        "narHash": "sha256-aUM6fegqcyzm0meFaQBoZQ1WXNENwUP3AVZ8fXtTG68=",
+        "lastModified": 1661882215,
+        "narHash": "sha256-7hfA5v0ZXQr963htXo8q4d/OUnoEjPWx8WiSt3DGC9c=",
         "owner": "NixOS",
         "repo": "nixpkgs",
-        "rev": "bc755f55d70562770d9bb7675e42c68f5c7ac8de",
+        "rev": "3402d9c4a4fe77e245c1b3b061997a83e6f7504e",
         "type": "github"
       },
       "original": {
@@ -497,11 +497,11 @@
     },
     "nixpkgs-stable": {
       "locked": {
-        "lastModified": 1661573771,
-        "narHash": "sha256-IBa1HhJ4V8ee48Nax19g61Fj6JYkp9AnIifNdbao1io=",
+        "lastModified": 1661864979,
+        "narHash": "sha256-ajXYYTE1uoY3ei/P1v+Knklf2QNCBxMtw1gByaPTGU4=",
         "owner": "NixOS",
         "repo": "nixpkgs",
-        "rev": "6cb1065d6e1016f849aac902206527a969ba62b3",
+        "rev": "a28adc36c20fd2fbaeb06ec9bbd79b6bf7443979",
         "type": "github"
       },
       "original": {
@@ -563,11 +563,11 @@
     },
     "nur": {
       "locked": {
-        "lastModified": 1661598986,
-        "narHash": "sha256-kHg67hWaNtkjAI1Lx1fPbnmF5nhf3CjRJLCem9qM/p0=",
+        "lastModified": 1661883947,
+        "narHash": "sha256-qaz+6u+PJAfiW/dhSd8HWu5Mpm9jru53aH/gk3TruIM=",
         "owner": "nix-community",
         "repo": "NUR",
-        "rev": "97e379f7286d90cd5086827d1250ad7ca7a3878b",
+        "rev": "2ec06c9e786ef01e7dd4bfab9644ffe0d9e0a71d",
         "type": "github"
       },
       "original": {
diff --git a/modules/nixfiles/emacs/doom/config.el b/modules/nixfiles/emacs/doom/config.el
index bd429c0..d4fb577 100644
--- a/modules/nixfiles/emacs/doom/config.el
+++ b/modules/nixfiles/emacs/doom/config.el
@@ -1,34 +1,69 @@
 ;;; config.el -*- lexical-binding: t; -*-
 
+;;
+;;; Misc
+;;
+
+(setq display-line-numbers-type t)
+
+(setq scroll-margin 10
+      hscroll-margin 10)
+
+(setq browse-url-generic-program (executable-find "firefox")
+      browse-url-browser-function 'browse-url-generic)
+
+;;
+;;; Doom-specific
+;;
+
+;; Make it more default-ey.
 (setq frame-title-format '("Emacs")
       icon-title-format frame-title-format)
 
 (setq doom-theme 'doom-tomorrow-night)
 
-(setq org-directory "~/doc/org/"
-      org-roam-directory "~/doc/roam/"
-      org-roam-db-location (concat org-roam-directory ".db")
-      org-todo-keywords '((sequence
-                           "PROJ(p)" ; A master task.
-                           "TODO(t)" ; A task that needs to be done with statues:
-                           "STRT(s@)" ; - In progress.
-                           "HOLD(l@/!)" ; - Paused because of me.
-                           "WAIT(w@/!)" ; - Paused because of not me.
-                           "|"
-                           "DONE(d@/!)" ; Complete state.
-                           "KILL(k@/!)")) ; Incomplete state.
-      org-todo-keyword-faces '(("PROJ" . +org-todo-project)
-                               ("TODO" . +org-todo-active)
-                               ("STRT" . +org-todo-active)
-                               ("HOLD" . +org-todo-onhold)
-                               ("WAIT" . +org-todo-onhold)
-                               ("DONE" . +org-todo-cancel)
-                               ("KILL" . +org-todo-cancel)))
-
-(use-package! websocket
-  :after org-roam)
+(setq +format-on-save-enabled-modes '(not nix-mode json-mode yaml-mode))
+
+;;
+;;; LSP
+;;
+
+(setq lsp-enable-suggest-server-download nil)
+
+;;
+;;; Org
+;;
+
+(setq org-directory "~/doc/org/")
+(after! org
+  (setq org-todo-keywords '((sequence
+                             "PROJ(p)" ; A master task.
+                             "TODO(t)" ; A task that needs to be done with statues:
+                             "STRT(s@)" ; - In progress.
+                             "HOLD(l@/!)" ; - Paused because of me.
+                             "WAIT(w@/!)" ; - Paused because of not me.
+                             "|"
+                             "DONE(d@/!)" ; Complete state.
+                             "KILL(k@/!)")) ; Incomplete state.
+        org-todo-keyword-faces '(("PROJ" . +org-todo-project)
+                                 ("TODO" . +org-todo-active)
+                                 ("STRT" . +org-todo-active)
+                                 ("HOLD" . +org-todo-onhold)
+                                 ("WAIT" . +org-todo-onhold)
+                                 ("DONE" . +org-todo-cancel)
+                                 ("KILL" . +org-todo-cancel))))
+
+(add-hook! 'org-mode-hook
+  (lambda (&rest _)
+    (setq fill-column 80)
+    (electric-indent-local-mode -1))
+  'auto-fill-mode)
+
+(setq org-roam-directory "~/doc/roam/"
+      org-roam-db-location (concat org-roam-directory ".db"))
 
 (use-package! org-roam-ui
+  :requires websocket
   :after org-roam
   :config
   (setq org-roam-ui-sync-theme t
@@ -36,14 +71,21 @@
         org-roam-ui-update-on-save t
         org-roam-ui-open-on-start t))
 
-(setq deft-directory org-directory
-      deft-default-extension "org")
+;;
+;;; Elisp
+;;
 
-(setq lsp-haskell-formatting-provider "brittany")
+(setq-default flycheck-disabled-checkers '(emacs-lisp-checkdoc))
 
-(setq editorconfig-exclude-modes '(elisp-mode))
+;;
+;;; Haskell
+;;
 
-(setq-default flycheck-disabled-checkers '(emacs-lisp-checkdoc))
+(setq lsp-haskell-formatting-provider "brittany")
+
+;;
+;;; Nix
+;;
 
 (after! lsp-mode
   (add-to-list 'lsp-language-id-configuration '(nix-mode . "nix"))
@@ -51,24 +93,18 @@
    (make-lsp-client :new-connection (lsp-stdio-connection '("rnix-lsp"))
                     :major-modes '(nix-mode)
                     :server-id 'nix))
-  (add-hook 'nix-mode-hook #'lsp!))
+  (add-hook! 'nix-mode-hook #'lsp!))
 
-(setq-hook! 'yaml-mode-hook +format-with-lsp nil)
-
-(setq +format-on-save-enabled-modes '(not yaml-mode nix-mode))
+;;
+;;; YAML
+;;
 
-(add-hook 'org-mode-hook
-          (lambda (&rest _)
-            (setq fill-column 80)))
-(add-hook 'org-mode-hook 'auto-fill-mode)
+(setq-hook! 'yaml-mode-hook +format-with-lsp nil)
 
-(add-hook 'org-mode-hook
-          (lambda (&rest _)
-            (electric-indent-local-mode -1)))
+;;
+;;; Elfeed
+;;
 
-;; TODO This directory will be synced with Syncthing to persist database across
-;; all machies. This is an attempt to mimic the guide from the link below
-;; http://babbagefiles.blogspot.com/2017/03/take-elfeed-everywhere-mobile-rss.html
 (setq elfeed-db-directory "~/.elfeed"
       elfeed-enclosure-default-dir (concat elfeed-db-directory "/enclosures")
       rmh-elfeed-org-files (list (concat elfeed-db-directory "/index.org"))
@@ -76,12 +112,9 @@
       elfeed-goodies/entry-pane-size 0.75
       elfeed-goodies/entry-pane-position 'bottom)
 
-(setq display-line-numbers-type t)
-
-(setq highlight-indent-guides-method 'fill)
-
-(setq browse-url-generic-program (executable-find "firefox")
-      browse-url-browser-function 'browse-url-generic)
+;;
+;;; mu4e
+;;
 
 (setq mu4e-root-maildir "~/mail"
       mu4e-context-policy 'ask-if-none
@@ -99,8 +132,7 @@
                                      "a.gondor@yahoo.com"))
 
 (set-email-account! "yahoo"
-                    '(
-                      (mu4e-sent-folder   . "/yahoo/Sent")
+                    '((mu4e-sent-folder   . "/yahoo/Sent")
                       (mu4e-drafts-folder . "/yahoo/Drafts")
                       (mu4e-trash-folder  . "/yahoo/Trash")
                       (mu4e-refile-folder . "/yahoo/Archive")
@@ -108,61 +140,59 @@
                     t)
 
 (set-email-account! "shire"
-                    '(
-                      (mu4e-drafts-folder . "/shire/Drafts")
+                    '((mu4e-drafts-folder . "/shire/Drafts")
                       (mu4e-refile-folder . "/shire/Archive")
                       (mu4e-sent-folder   . "/shire/Sent")
                       (mu4e-trash-folder  . "/shire/Trash")
                       (smtpmail-smtp-user . "azahi"))
                     t)
 
+;;
+;;; Circe
+;;
+
+(defun nixfiles/irc-bouncer-password-f (&rest _)
+  (+pass-get-secret "server/soju.manwe.shire.me/azahi"))
+
 (set-irc-server! "libera"
-  `(
-    :host "shire.me"
+  `(:host "shire.me"
     :port 6667
     :user "azahi/libera"
-    :pass (lambda (&rest _)
-            (+pass-get-secret "server/soju.manwe.shire.me/azahi"))))
+    :pass #'nixfiles/irc-bouncer-password-f))
 
 (set-irc-server! "oftc"
-  `(
-    :host "shire.me"
+  `(:host "shire.me"
     :port 6667
     :user "azahi/oftc"
-    :pass (lambda (&rest _)
-            (+pass-get-secret "server/soju.manwe.shire.me/azahi"))))
+    :pass #'nixfiles/irc-bouncer-password-f))
 
 (set-irc-server! "rizon"
-  `(
-    :host "shire.me"
+  `(:host "shire.me"
     :port 6667
     :user "azahi/rizon"
-    :pass (lambda (&rest _)
-            (+pass-get-secret "server/soju.manwe.shire.me/azahi"))))
-
-(use-package! hledger-mode
-  :mode ("\\.journal\\'")
-  :hook ((hledger-view-mode . hl-line-mode)
-         (hledger-view-mode . center-text-for-reading))
-  :init
-  (setq hledger-jfile "~/doc/accounting/current.journal")
-  :config
-  (set-company-backend! 'hledger-mode
-    'hledger-company)
-
-  (add-hook 'hledger-mode-hook
-            (lambda (&rest _)
-              (make-local-variable 'company-backends)
-              (add-to-list 'company-backends 'hledger-company))))
-
-(use-package! hledger-input
-  :hook ((hledger-input-post-commit . hledger-show-new-balances)
-         (hledger-input-mode . auto-fill-mode)
-         (hledger-input-mode . (lambda (&rest _)
-                                 (make-local-variable 'compay-idle-delay)
-                                 (setq-local company-idle-delay 0.1))))
-  :init
-  (setq hledger-input-buffer-height 20))
+    :pass #'nixfiles/irc-bouncer-password-f))
+
+;; (use-package! hledger-mode
+;;   :mode ("\\.journal\\'")
+;;   :hook ((hledger-view-mode . hl-line-mode)
+;;          (hledger-view-mode . center-text-for-reading))
+;;   :init
+;;   (setq hledger-jfile "~/doc/accounting/current.journal")
+;;   :config
+;;   (set-company-backend! 'hledger-mode 'hledger-company)
+;;   (add-hook! 'hledger-mode-hook
+;;     (lambda (&rest _)
+;;       (make-local-variable 'company-backends)
+;;       (add-to-list 'company-backends 'hledger-company))))
+
+;; (use-package! hledger-input
+;;   :hook ((hledger-input-post-commit . hledger-show-new-balances)
+;;          (hledger-input-mode . auto-fill-mode)
+;;          (hledger-input-mode . (lambda (&rest _)
+;;                                  (make-local-variable 'compay-idle-delay)
+;;                                  (setq-local company-idle-delay 0.1))))
+;;   :init
+;;   (setq hledger-input-buffer-height 20))
 
 (use-package! kubernetes
   :defer t
@@ -175,6 +205,3 @@
 
 (use-package! kubernetes-tramp
   :defer t)
-
-(provide 'config)
-;;; config.el ends here
diff --git a/modules/nixfiles/emacs/doom/packages.el b/modules/nixfiles/emacs/doom/packages.el
index 80651f2..369fb2e 100644
--- a/modules/nixfiles/emacs/doom/packages.el
+++ b/modules/nixfiles/emacs/doom/packages.el
@@ -2,12 +2,6 @@
 
 (disable-packages! writegood-mode)
 
-(package! hledger-mode)
-
-(package! kubernetes)
-(package! kubernetes-evil)
-(package! kubernetes-tramp)
-
 (unpin! org-roam)
 (package! org-roam
   :recipe (:host github
@@ -17,3 +11,9 @@
   :recipe (:host github
            :repo "org-roam/org-roam-ui"
            :branch "main"))
+
+;; (package! hledger-mode)
+
+(package! kubernetes)
+(package! kubernetes-evil)
+(package! kubernetes-tramp)
diff --git a/modules/nixfiles/firefox/userContent.css b/modules/nixfiles/firefox/userContent.css
index 8426dc3..b93d5dd 100644
--- a/modules/nixfiles/firefox/userContent.css
+++ b/modules/nixfiles/firefox/userContent.css
@@ -82,6 +82,7 @@
     .tm-block_spacing-around,
     .tm-comment-footer,
     .tm-comment__header,
+    .tm-editoral-subscription,
     .tm-footer,
     .tm-footer-menu,
     .tm-header,
@@ -127,7 +128,7 @@
     }
 }
 
-@-moz-document url-prefix(https://jisho.org)
+@-moz-document url-prefix("https://jisho.org")
 {
     header,
     footer {
@@ -135,7 +136,7 @@
     }
 }
 
-@-moz-document url-prefix(https://search.nixos.org)
+@-moz-document url-prefix("https://search.nixos.org")
 {
     .search-sidebar,
     footer.container {
@@ -150,7 +151,7 @@
     }
 }
 
-@-moz-document url-prefix(https://steamdb.info)
+@-moz-document url-prefix("https://steamdb.info")
 {
     #steamdb-extension-protip {
         display: none !important;
@@ -167,7 +168,7 @@
     }
 }
 
-@-moz-document url-prefix(https://utaten.com/lyric)
+@-moz-document url-prefix("https://utaten.com/lyric")
 {
     :root {
         --kana-font-size: 20px;
@@ -208,3 +209,44 @@
         width: 100% !important;
     }
 }
+
+@-moz-document url-prefix("https://www.songsterr.com")
+{
+    #favorite,
+    #fullscreen,
+    #logo,
+    #menu-favorites,
+    #menu-help,
+    #menu-plus,
+    #menu-signin,
+    #menu-submit,
+    #promo,
+    #revisions,
+    #showroom,
+    #text-showroom,
+    footer {
+        display: none !important;
+    }
+}
+
+@-moz-document url-prefix("https://tabs.ultimate-guitar.com")
+{
+    #comment,
+    #shots,
+    a[rel*="noreferrer"],
+    a[target="_blank"],
+    div[class*="SiteWideBanner"] {
+        display: none !important;
+    }
+}
+
+@-moz-document url-prefix("https://developer.mozilla.org")
+{
+    .main-document-header-container.top-navigation {
+        display: none !important;
+    }
+
+    .sidebar {
+        --offset: default !important;
+    }
+}

Consider giving Nix/NixOS a try! <3