about summary refs log tree commit diff
path: root/modules/common
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2023-11-09 03:00:14 +0300
committerAzat Bahawi <azat@bahawi.net>2023-11-09 03:00:14 +0300
commit303b8e2ed8b836858b4dc6ca2210178ace9c6b6f (patch)
treeeb0f4fbda60c70e86921109033c842fca1b3824f /modules/common
parent2023-11-05 (diff)
2023-11-09
Diffstat (limited to '')
-rw-r--r--modules/common/common/nix/default.nix1
-rw-r--r--modules/common/emacs/default.nix7
-rw-r--r--modules/common/emacs/doom/config.el49
-rw-r--r--modules/common/emacs/doom/init.el6
-rw-r--r--modules/common/fonts.nix7
-rw-r--r--modules/common/mpv.nix79
-rw-r--r--modules/common/zathura.nix5
7 files changed, 36 insertions, 118 deletions
diff --git a/modules/common/common/nix/default.nix b/modules/common/common/nix/default.nix
index ad7e706..370667c 100644
--- a/modules/common/common/nix/default.nix
+++ b/modules/common/common/nix/default.nix
@@ -190,6 +190,7 @@ with lib; {
           this = my.configurations.${hostname};
           inherit (local) config;
           inherit (local.config.system.build) toplevel vm vmWithBootLoader manual;
+          pretty = expr: lib.trace (lib.generators.toPretty {} expr) {};
         } // configurations // local._module.args
       '';
 
diff --git a/modules/common/emacs/default.nix b/modules/common/emacs/default.nix
index dfc657c..e7597ad 100644
--- a/modules/common/emacs/default.nix
+++ b/modules/common/emacs/default.nix
@@ -83,6 +83,8 @@ in {
                     gnumake # :term vterm
                     gnuplot # :lang (org +gnuplot)
                     gnutls # doom!
+                    go # :lang go org
+                    gocode # :lang go org
                     gomodifytags # :lang go
                     gopls # :lang (go +lsp)
                     gore # :lang go
@@ -154,7 +156,10 @@ in {
                       circe-default-user circe-default-nick)
 
                 ;; :lang plantuml
-                (setq org-plantuml-jar-path "${pkgs.plantuml}/lib/plantuml.jar")
+                (setq plantuml-jar-path "${pkgs.plantuml}/lib/plantuml.jar"
+                      plantuml-executable-path "${pkgs.plantuml}/bin/plantuml"
+                      org-plantuml-jar-path plantuml-jar-path
+                      org-plantuml-executable-path plantuml-executable-path)
 
                 ;; :input japanese
                 (setq migemo-dictionary "${pkgs.cmigemo}/share/migemo/utf-8/migemo-dict")
diff --git a/modules/common/emacs/doom/config.el b/modules/common/emacs/doom/config.el
index 493a79a..df8b82e 100644
--- a/modules/common/emacs/doom/config.el
+++ b/modules/common/emacs/doom/config.el
@@ -50,7 +50,6 @@
                                  ("WAIT" . +org-todo-onhold)
                                  ("HOLD" . +org-todo-onhold)
                                  ("PROJ" . +org-todo-project)
-                                 ("NO"   . +org-todo-cancel)
                                  ("KILL" . +org-todo-cancel))
         org-capture-templates '(("t" "Personal todo" entry
                                  (file+headline +org-capture-todo-file "Inbox")
@@ -62,13 +61,13 @@
                                  (file+olp+datetree +org-capture-journal-file)
                                  "* %U %?\n%i\n%a" :prepend t)
                                 ("p" "Templates for projects")
-                                ("pt" "Project-local todo" entry  ; {project-root}/todo.org
+                                ("pt" "Project-local todo" entry
                                  (file+headline +org-capture-project-todo-file "Inbox")
                                  "* TODO %?\n%i\n%a" :prepend t)
-                                ("pn" "Project-local notes" entry  ; {project-root}/notes.org
+                                ("pn" "Project-local notes" entry
                                  (file+headline +org-capture-project-notes-file "Inbox")
                                  "* %U %?\n%i\n%a" :prepend t)
-                                ("pc" "Project-local changelog" entry  ; {project-root}/changelog.org
+                                ("pc" "Project-local changelog" entry
                                  (file+headline +org-capture-project-changelog-file "Unreleased")
                                  "* %U %?\n%i\n%a" :prepend t)
                                 ("o" "Centralized templates for projects")
@@ -105,6 +104,13 @@
         org-roam-ui-open-on-start t))
 
 ;;
+;;; PlantUML
+;;
+
+(setq plantuml-default-exec-mode 'executable
+      org-plantuml-exec-mode 'plantuml)
+
+;;
 ;;; Elisp
 ;;
 
@@ -166,32 +172,15 @@
 ;;; Circe
 ;;
 
-(defun nixfiles/irc-bouncer-password-f (&rest _)
-  (+pass-get-secret "server/soju.manwe.shire.net/azahi"))
-
-(set-irc-server! "libera"
-  `(:host "shire.net"
-    :port 6667
-    :user "azahi/libera"
-    :pass nixfiles/irc-bouncer-password-f))
-
-(set-irc-server! "oftc"
-  `(:host "shire.net"
-    :port 6667
-    :user "azahi/oftc"
-    :pass nixfiles/irc-bouncer-password-f))
-
-(set-irc-server! "hackint"
-  `(:host "shire.net"
-    :port 6667
-    :user "azahi/hackint"
-    :pass nixfiles/irc-bouncer-password-f))
-
-(set-irc-server! "rizon"
-  `(:host "shire.net"
-    :port 6667
-    :user "azahi/rizon"
-    :pass nixfiles/irc-bouncer-password-f))
+(setq circe-network-options
+      (mapcar (lambda (server)
+                `(,server :server-buffer-name ,server
+                          :host "shire.net"
+                          :port 6667
+                          :user ,(concat circe-default-user "/" server)
+                          :pass ,(lambda (&rest _)
+                                   (+pass-get-secret "server/soju.manwe.shire.net/azahi"))))
+              '("libera" "oftc" "hackint" "rizon")))
 
 ;;
 ;;; Hledger
diff --git a/modules/common/emacs/doom/init.el b/modules/common/emacs/doom/init.el
index a76d0e3..3b26e0d 100644
--- a/modules/common/emacs/doom/init.el
+++ b/modules/common/emacs/doom/init.el
@@ -10,12 +10,12 @@
        doom
        ;; doom-dashboard
        ;; doom-quit
-       ;; emoji
+       (emoji +unicode)
        hl-todo
        hydra
        indent-guides
-       ;; ligatures
-       ;; modeline
+       (ligatures +extra)
+       (modeline +light)
        ;; nav-flash
        ophints
        (popup +defaults)
diff --git a/modules/common/fonts.nix b/modules/common/fonts.nix
index adf6a3f..1e204e5 100644
--- a/modules/common/fonts.nix
+++ b/modules/common/fonts.nix
@@ -24,6 +24,13 @@ with lib; {
         (iosevka-bin.override {variant = "etoile";})
         iosevka-bin
         sarasa-gothic
+        source-han-mono
+        source-han-sans
+        source-han-serif
+        noto-fonts
+        noto-fonts-emoji
+        twitter-color-emoji
+        font-awesome
       ];
     };
 
diff --git a/modules/common/mpv.nix b/modules/common/mpv.nix
index 757ccd8..37fbe4c 100644
--- a/modules/common/mpv.nix
+++ b/modules/common/mpv.nix
@@ -10,85 +10,6 @@ in {
   options.nixfiles.modules.mpv.enable = mkEnableOption "mpv";
 
   config = mkIf cfg.enable {
-    nixfiles.modules.common.xdg.defaultApplications.mpv = let
-      audio = [
-        "audio/aac"
-        "audio/ac3"
-        "audio/basic"
-        "audio/flac"
-        "audio/midi"
-        "audio/mp4"
-        "audio/mpeg"
-        "audio/ogg"
-        "audio/opus"
-        "audio/vnd.dts"
-        "audio/vnd.dts.hd"
-        "audio/webm"
-        "audio/x-adpcm"
-        "audio/x-aifc"
-        "audio/x-aiff"
-        "audio/x-ape"
-        "audio/x-flac+ogg"
-        "audio/x-m4b"
-        "audio/x-m4r"
-        "audio/x-matroska"
-        "audio/x-mpegurl"
-        "audio/x-musepack"
-        "audio/x-opus+ogg"
-        "audio/x-speex"
-        "audio/x-speex+ogg"
-        "audio/x-vorbis+ogg"
-        "audio/x-wav"
-        "audio/x-wavpack"
-        "x-content/audio-cdda"
-        "x-content/audio-dvd"
-      ];
-      video = [
-        "video/3gpp"
-        "video/3gpp2"
-        "video/mkv"
-        "video/mp2t"
-        "video/mp4"
-        "video/mpeg"
-        "video/ogg"
-        "video/quicktime"
-        "video/vnd.mpegurl"
-        "video/vnd.radgamettools.bink"
-        "video/vnd.radgamettools.smacker"
-        "video/wavelet"
-        "video/webm"
-        "video/x-matroska"
-        "video/x-matroska-3d"
-        "video/x-mjpeg"
-        "video/x-msvideo"
-        "video/x-ogm+ogg"
-        "video/x-theora+ogg"
-        "x-content/video-bluray"
-        "x-content/video-dvd"
-        "x-content/video-hddvd"
-        "x-content/video-svcd"
-        "x-content/video-vcd"
-      ];
-      image = [
-        "image/avif"
-        "image/bmp"
-        "image/gif"
-        "image/jp2"
-        "image/jpeg"
-        "image/jpg"
-        "image/jpm"
-        "image/jpx"
-        "image/jxl"
-        "image/png"
-        "image/tiff"
-        "image/vnd.microsoft.icon"
-        "image/webp"
-        "image/webp"
-        "image/x-tga"
-      ];
-    in
-      audio ++ video ++ image;
-
     hm.programs = {
       mpv = {
         enable = true;
diff --git a/modules/common/zathura.nix b/modules/common/zathura.nix
index 408f218..f78a9e9 100644
--- a/modules/common/zathura.nix
+++ b/modules/common/zathura.nix
@@ -10,11 +10,6 @@ in {
     mkEnableOption "Zathura PDF reader";
 
   config = mkIf cfg.enable {
-    nixfiles.modules.common.xdg.defaultApplications."org.pwmt.zathura" = [
-      "application/pdf"
-      "application/epub+zip"
-    ];
-
     hm.programs.zathura = with config.nixfiles.modules; {
       enable = true;
 

Consider giving Nix/NixOS a try! <3