diff options
author | Azat Bahawi <azat@bahawi.net> | 2022-08-16 02:01:55 +0300 |
---|---|---|
committer | Azat Bahawi <azat@bahawi.net> | 2022-08-16 02:01:55 +0300 |
commit | 7a1a900334653e7cadfd60e1c92c128bf9c5a951 (patch) | |
tree | 8d90976f82f816fad2b0cf8a6e995368f8f80580 | |
parent | 2022-08-15 (diff) |
2022-08-16
-rw-r--r-- | flake.lock | 441 | ||||
-rw-r--r-- | flake.nix | 13 | ||||
-rw-r--r-- | modules/nixfiles/default.nix | 2 | ||||
-rw-r--r-- | modules/nixfiles/emacs/default.nix (renamed from modules/nixfiles/emacs.nix) | 26 | ||||
-rw-r--r-- | modules/nixfiles/emacs/doom/config.el | 183 | ||||
-rw-r--r-- | modules/nixfiles/emacs/doom/custom.el | 0 | ||||
-rw-r--r-- | modules/nixfiles/emacs/doom/init.el | 134 | ||||
-rw-r--r-- | modules/nixfiles/emacs/doom/packages.el | 23 |
8 files changed, 784 insertions, 38 deletions
diff --git a/flake.lock b/flake.lock index a43b116..16be0a7 100644 --- a/flake.lock +++ b/flake.lock @@ -78,6 +78,39 @@ "type": "github" } }, + "doom-emacs": { + "flake": false, + "locked": { + "lastModified": 1659994866, + "narHash": "sha256-6lxvYfoPtzvinBHKvuUDpCz44IJpmZMLfLMy5q9UcFk=", + "owner": "doomemacs", + "repo": "doomemacs", + "rev": "b06fd63dcb686045d0c105f93e07f80cb8de6800", + "type": "github" + }, + "original": { + "owner": "doomemacs", + "ref": "master", + "repo": "doomemacs", + "type": "github" + } + }, + "doom-snippets": { + "flake": false, + "locked": { + "lastModified": 1655900328, + "narHash": "sha256-fEYwFxW2sdzNK14DrS92OCGy8KDPZKewrHljnE/RlzQ=", + "owner": "doomemacs", + "repo": "snippets", + "rev": "6b2bd5a77c536ed414794ecf71d37a60ebd4663e", + "type": "github" + }, + "original": { + "owner": "doomemacs", + "repo": "snippets", + "type": "github" + } + }, "emacs-overlay": { "inputs": { "flake-utils": [ @@ -88,11 +121,11 @@ ] }, "locked": { - "lastModified": 1660536682, - "narHash": "sha256-CGbMejdZReOEVZxuv+mGudFE+YR/XAJWgfFihyqEEyM=", + "lastModified": 1660589839, + "narHash": "sha256-leEjC9NmyMwUr/YPrr5w2UQD0WHDqh586V3JnSLs8W4=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "3d062518dc99ec4841b08c1a3c4f64ef2df330ca", + "rev": "864c7d3ec1e42ac7983d832dea7f737047a9ede9", "type": "github" }, "original": { @@ -102,19 +135,114 @@ "type": "github" } }, + "emacs-so-long": { + "flake": false, + "locked": { + "lastModified": 1575031854, + "narHash": "sha256-xIa5zO0ZaToDrec1OFjBK6l39AbA4l/CE4LInVu2hi0=", + "owner": "hlissner", + "repo": "emacs-so-long", + "rev": "ed666b0716f60e8988c455804de24b55919e71ca", + "type": "github" + }, + "original": { + "owner": "hlissner", + "repo": "emacs-so-long", + "type": "github" + } + }, + "evil-escape": { + "flake": false, + "locked": { + "lastModified": 1588439096, + "narHash": "sha256-aB2Ge5o/93B18tPf4fN1c+O46CNh/nOqwLJbox4c8Gw=", + "owner": "hlissner", + "repo": "evil-escape", + "rev": "819f1ee1cf3f69a1ae920e6004f2c0baeebbe077", + "type": "github" + }, + "original": { + "owner": "hlissner", + "repo": "evil-escape", + "type": "github" + } + }, + "evil-markdown": { + "flake": false, + "locked": { + "lastModified": 1626852210, + "narHash": "sha256-HBBuZ1VWIn6kwK5CtGIvHM1+9eiNiKPH0GUsyvpUVN8=", + "owner": "Somelauw", + "repo": "evil-markdown", + "rev": "8e6cc68af83914b2fa9fd3a3b8472573dbcef477", + "type": "github" + }, + "original": { + "owner": "Somelauw", + "repo": "evil-markdown", + "type": "github" + } + }, + "evil-org-mode": { + "flake": false, + "locked": { + "lastModified": 1607203864, + "narHash": "sha256-JxwqVYDN6OIJEH15MVI6XOZAPtUWUhJQWHyzcrUvrFg=", + "owner": "hlissner", + "repo": "evil-org-mode", + "rev": "a9706da260c45b98601bcd72b1d2c0a24a017700", + "type": "github" + }, + "original": { + "owner": "hlissner", + "repo": "evil-org-mode", + "type": "github" + } + }, + "evil-quick-diff": { + "flake": false, + "locked": { + "lastModified": 1575189609, + "narHash": "sha256-oGzl1ayW9rIuq0haoiFS7RZsS8NFMdEA7K1BSozgnJU=", + "owner": "rgrinberg", + "repo": "evil-quick-diff", + "rev": "69c883720b30a892c63bc89f49d4f0e8b8028908", + "type": "github" + }, + "original": { + "owner": "rgrinberg", + "repo": "evil-quick-diff", + "type": "github" + } + }, + "explain-pause-mode": { + "flake": false, + "locked": { + "lastModified": 1595842060, + "narHash": "sha256-++znrjiDSx+cy4okFBBXUBkRFdtnE2x+trkmqjB3Njs=", + "owner": "lastquestion", + "repo": "explain-pause-mode", + "rev": "2356c8c3639cbeeb9751744dbe737267849b4b51", + "type": "github" + }, + "original": { + "owner": "lastquestion", + "repo": "explain-pause-mode", + "type": "github" + } + }, "flake-compat": { "flake": false, "locked": { - "lastModified": 1627913399, - "narHash": "sha256-hY8g6H2KFL8ownSiFeMOjwPC8P0ueXpCVEbxgda3pko=", + "lastModified": 1650374568, + "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", "owner": "edolstra", "repo": "flake-compat", - "rev": "12c64ca55c1014cdc1b16ed5a804aa8576601ff2", + "rev": "b4a34015c698c7793d592d66adbab377907a2be8", "type": "github" }, "original": { "owner": "edolstra", - "ref": "master", "repo": "flake-compat", "type": "github" } @@ -152,6 +280,23 @@ "type": "github" } }, + "format-all": { + "flake": false, + "locked": { + "lastModified": 1581716637, + "narHash": "sha256-ul7LCe60W8TIvUmUtZtZRo8489TK9iTPDsLHmzxY57M=", + "owner": "lassik", + "repo": "emacs-format-all-the-code", + "rev": "47d862d40a088ca089c92cd393c6dca4628f87d3", + "type": "github" + }, + "original": { + "owner": "lassik", + "repo": "emacs-format-all-the-code", + "rev": "47d862d40a088ca089c92cd393c6dca4628f87d3", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -162,11 +307,11 @@ ] }, "locked": { - "lastModified": 1660505226, - "narHash": "sha256-Jl1w6X3qNfp0Y5PwRlz/tlhVa6Wzzceq1iScni3gb9s=", + "lastModified": 1660574517, + "narHash": "sha256-Lp5D2pAPrM3iAc1eeR0iGwz5rM+SYOWzVxI3p17nlrU=", "owner": "nix-community", "repo": "home-manager", - "rev": "ff5133843c26979f8abb5dd801b32f40287692fa", + "rev": "688e5c85b7537f308b82167c8eb4ecfb70a49861", "type": "github" }, "original": { @@ -176,6 +321,71 @@ "type": "github" } }, + "nix-doom-emacs": { + "inputs": { + "doom-emacs": "doom-emacs", + "doom-snippets": "doom-snippets", + "emacs-overlay": [ + "emacs-overlay" + ], + "emacs-so-long": "emacs-so-long", + "evil-escape": "evil-escape", + "evil-markdown": "evil-markdown", + "evil-org-mode": "evil-org-mode", + "evil-quick-diff": "evil-quick-diff", + "explain-pause-mode": "explain-pause-mode", + "flake-compat": "flake-compat", + "flake-utils": [ + "flake-utils" + ], + "format-all": "format-all", + "nix-straight": "nix-straight", + "nixpkgs": [ + "nixpkgs" + ], + "nose": "nose", + "ob-racket": "ob-racket", + "org": "org", + "org-contrib": "org-contrib", + "org-yt": "org-yt", + "php-extras": "php-extras", + "revealjs": "revealjs", + "rotate-text": "rotate-text", + "sln-mode": "sln-mode", + "ts-fold": "ts-fold", + "ws-butler": "ws-butler" + }, + "locked": { + "lastModified": 1660129951, + "narHash": "sha256-uY0fxCwUQ5LmfX2CoklqOebKl6GM96qir2Zv1cbHdQI=", + "owner": "nix-community", + "repo": "nix-doom-emacs", + "rev": "20ca56a17dc33d67ed7d61b0e84205c617394b5b", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "master", + "repo": "nix-doom-emacs", + "type": "github" + } + }, + "nix-straight": { + "flake": false, + "locked": { + "lastModified": 1656684255, + "narHash": "sha256-ZefQiv4Ipu2VkLjs1oyelTLU7kBVJgkcQd+yBpJU0yo=", + "owner": "nix-community", + "repo": "nix-straight.el", + "rev": "fb8dd5c44cde70abd13380766e40af7a63888942", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nix-straight.el", + "type": "github" + } + }, "nixos-hardware": { "locked": { "lastModified": 1660407119, @@ -194,11 +404,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1660524483, - "narHash": "sha256-Rb/AZ5FErbML2f6+XxJTo+BbDMVtiTVGWML4pOiwBSE=", + "lastModified": 1660551188, + "narHash": "sha256-a1LARMMYQ8DPx1BgoI/UN4bXe12hhZkCNqdxNi6uS0g=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "680f04a9930fa0b9572abda5a9429cb2b1c77655", + "rev": "441dc5d512153039f19ef198e662e4f3dbb9fd65", "type": "github" }, "original": { @@ -210,11 +420,11 @@ }, "nixpkgs-master": { "locked": { - "lastModified": 1660546381, - "narHash": "sha256-rEzCjeWVGhK5AyHxm1zet0lF6+AVSW3JuU5LAU2SMYU=", + "lastModified": 1660604230, + "narHash": "sha256-TqiA8OkurjHr+ulXwcIvZHQsv9Qs+r25Po69ptjQ8Mk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "eb642f80f9aecc19312909e08601a3c2020b5ce2", + "rev": "8138a92a2af2b5071e8d2b8e5e066dd4f7c10dbf", "type": "github" }, "original": { @@ -226,11 +436,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1660525516, - "narHash": "sha256-oklU9Q6YoooEAibAzjewb6ijW9cHVwsi45RwwhIE9LY=", + "lastModified": 1660600974, + "narHash": "sha256-Oaba9SQmoIPbEehbX/TMV2eCJlwyXFuX8Xi6tsx1nuU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "cfabaa15e98b54dc0e9bacbecb19ee850fdba240", + "rev": "50b6709b401f0bfa7e8fadd50c14a8c63c319156", "type": "github" }, "original": { @@ -274,13 +484,29 @@ "type": "github" } }, + "nose": { + "flake": false, + "locked": { + "lastModified": 1400604510, + "narHash": "sha256-daEi8Kta1oGaDEmUUDDQMahTTPOpvNpDKk22rlr7cB0=", + "owner": "emacsattic", + "repo": "nose", + "rev": "f8528297519eba911696c4e68fa88892de9a7b72", + "type": "github" + }, + "original": { + "owner": "emacsattic", + "repo": "nose", + "type": "github" + } + }, "nur": { "locked": { - "lastModified": 1660549024, - "narHash": "sha256-4N3bQuvigu6S1VixOya0YNjX/pEQ38oZ4M0ky2NVolA=", + "lastModified": 1660587989, + "narHash": "sha256-ednhBmap0xROu9m6KxrclF1YWZuiXC2syUREsv/kKZk=", "owner": "nix-community", "repo": "NUR", - "rev": "cd96964dbf39599a9a4106b84f8db05a848ac5ae", + "rev": "0207414d63f3a319587f957eda2bd6ec4e9951a2", "type": "github" }, "original": { @@ -290,6 +516,86 @@ "type": "github" } }, + "ob-racket": { + "flake": false, + "locked": { + "lastModified": 1584656173, + "narHash": "sha256-rBUYDDCXb+3D4xTPQo9UocbTPZ32kWV1Uya/1DmZknU=", + "owner": "xchrishawk", + "repo": "ob-racket", + "rev": "83457ec9e1e96a29fd2086ed19432b9d75787673", + "type": "github" + }, + "original": { + "owner": "xchrishawk", + "repo": "ob-racket", + "type": "github" + } + }, + "org": { + "flake": false, + "locked": { + "lastModified": 1659533964, + "narHash": "sha256-ipwJjcRzY9iqEjkG4m8EXZ6+8OMdANuXRnSwct2LByQ=", + "owner": "emacs-straight", + "repo": "org-mode", + "rev": "4702a73031c77ba03b480b0848c137d5d8773e07", + "type": "github" + }, + "original": { + "owner": "emacs-straight", + "repo": "org-mode", + "type": "github" + } + }, + "org-contrib": { + "flake": false, + "locked": { + "lastModified": 1659039737, + "narHash": "sha256-ig8pVl790DopN6ZrCTIrvojt5/0Y+aOsjE87pqIVz8M=", + "owner": "emacsmirror", + "repo": "org-contrib", + "rev": "39e2abc5629c1be6186bb6489ec4f76524edf82a", + "type": "github" + }, + "original": { + "owner": "emacsmirror", + "repo": "org-contrib", + "type": "github" + } + }, + "org-yt": { + "flake": false, + "locked": { + "lastModified": 1527381913, + "narHash": "sha256-dzQ6B7ryzatHCTLyEnRSbWO0VUiX/FHYnpHTs74aVUs=", + "owner": "TobiasZawada", + "repo": "org-yt", + "rev": "40cc1ac76d741055cbefa13860d9f070a7ade001", + "type": "github" + }, + "original": { + "owner": "TobiasZawada", + "repo": "org-yt", + "type": "github" + } + }, + "php-extras": { + "flake": false, + "locked": { + "lastModified": 1573312690, + "narHash": "sha256-r4WyVbzvT0ra4Z6JywNBOw5RxOEYd6Qe2IpebHXkj1U=", + "owner": "arnested", + "repo": "php-extras", + "rev": "d410c5af663c30c01d461ac476d1cbfbacb49367", + "type": "github" + }, + "original": { + "owner": "arnested", + "repo": "php-extras", + "type": "github" + } + }, "pre-commit-hooks": { "inputs": { "flake-utils": [ @@ -314,6 +620,22 @@ "type": "github" } }, + "revealjs": { + "flake": false, + "locked": { + "lastModified": 1653993278, + "narHash": "sha256-X43lsjoLBWmttIKj9Jzut0UP0dZlsue3fYbJ3++ojbU=", + "owner": "hakimel", + "repo": "reveal.js", + "rev": "039972c730690af7a83a5cb832056a7cc8b565d7", + "type": "github" + }, + "original": { + "owner": "hakimel", + "repo": "reveal.js", + "type": "github" + } + }, "root": { "inputs": { "agenix": "agenix", @@ -323,6 +645,7 @@ "flake-registry": "flake-registry", "flake-utils": "flake-utils", "home-manager": "home-manager", + "nix-doom-emacs": "nix-doom-emacs", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", "nixpkgs-master": "nixpkgs-master", @@ -335,6 +658,22 @@ "xmonad-ng": "xmonad-ng" } }, + "rotate-text": { + "flake": false, + "locked": { + "lastModified": 1322962747, + "narHash": "sha256-SOeOgSlcEIsKhUiYDJv0p+mLUb420s9E2BmvZQvZ0wk=", + "owner": "debug-ito", + "repo": "rotate-text.el", + "rev": "48f193697db996855aee1ad2bc99b38c6646fe76", + "type": "github" + }, + "original": { + "owner": "debug-ito", + "repo": "rotate-text.el", + "type": "github" + } + }, "simple-nixos-mailserver": { "inputs": { "blobs": "blobs", @@ -363,25 +702,69 @@ "type": "gitlab" } }, + "sln-mode": { + "flake": false, + "locked": { + "lastModified": 1423727528, + "narHash": "sha256-XqkqPyEJuTtFslOz1fpTf/Klbd/zA7IGpzpmum/MGao=", + "owner": "sensorflo", + "repo": "sln-mode", + "rev": "0f91d1b957c7d2a7bab9278ec57b54d57f1dbd9c", + "type": "github" + }, + "original": { + "owner": "sensorflo", + "repo": "sln-mode", + "type": "github" + } + }, + "ts-fold": { + "flake": false, + "locked": { + "lastModified": 1659171920, + "narHash": "sha256-/yY3Ph/BE3PFZhnBIQIHkwOW/43phSI7WeoMvU83TG4=", + "owner": "jcs-elpa", + "repo": "ts-fold", + "rev": "17d131f69a717d7e8cc6d3af9dfa7d2b5e2b78ef", + "type": "github" + }, + "original": { + "owner": "jcs-elpa", + "repo": "ts-fold", + "type": "github" + } + }, + "ws-butler": { + "flake": false, + "locked": { + "lastModified": 1634511126, + "narHash": "sha256-c0y0ZPtxxICPk+eaNbbQf6t+FRCliNY54CCz9QHQ8ZI=", + "owner": "hlissner", + "repo": "ws-butler", + "rev": "572a10c11b6cb88293de48acbb59a059d36f9ba5", + "type": "github" + }, + "original": { + "owner": "hlissner", + "repo": "ws-butler", + "type": "github" + } + }, "xmonad-ng": { "inputs": { - "flake-compat": "flake-compat", "flake-utils": [ "flake-utils" ], "nixpkgs": [ "nixpkgs" - ], - "pre-commit-hooks": [ - "pre-commit-hooks" ] }, "locked": { - "lastModified": 1644967454, - "narHash": "sha256-LYdzh5e5nITWbW7lFb9r5xva5k5YQ9rcFIsORgV7zZE=", + "lastModified": 1660604184, + "narHash": "sha256-iZLY0PNsscaAgHQOY/iuV9yFIHdkEVF1m9mHfN0lT/c=", "owner": "azahi", "repo": "xmonad-ng", - "rev": "0a150971e7cc05f518e290ad6d4d21b9311e6147", + "rev": "ba163659c9652efe46dd22cb4ad38e8a99adaf7c", "type": "gitlab" }, "original": { diff --git a/flake.nix b/flake.nix index 5893e49..4db413f 100644 --- a/flake.nix +++ b/flake.nix @@ -63,6 +63,18 @@ }; }; + nix-doom-emacs = { + type = "github"; + owner = "nix-community"; + repo = "nix-doom-emacs"; + ref = "master"; + inputs = { + flake-utils.follows = "flake-utils"; + emacs-overlay.follows = "emacs-overlay"; + nixpkgs.follows = "nixpkgs"; + }; + }; + dns-nix = { type = "github"; owner = "kirelagin"; @@ -141,7 +153,6 @@ inputs = { flake-utils.follows = "flake-utils"; nixpkgs.follows = "nixpkgs"; - pre-commit-hooks.follows = "pre-commit-hooks"; }; }; diff --git a/modules/nixfiles/default.nix b/modules/nixfiles/default.nix index 8d26e7f..8632833 100644 --- a/modules/nixfiles/default.nix +++ b/modules/nixfiles/default.nix @@ -15,7 +15,7 @@ ./direnv.nix ./docker.nix ./dwm.nix - ./emacs.nix + ./emacs ./endlessh-go.nix ./endlessh.nix ./fail2ban.nix diff --git a/modules/nixfiles/emacs.nix b/modules/nixfiles/emacs/default.nix index 230b965..3ebab5f 100644 --- a/modules/nixfiles/emacs.nix +++ b/modules/nixfiles/emacs/default.nix @@ -1,5 +1,6 @@ { config, + inputs, lib, pkgs, ... @@ -13,6 +14,10 @@ in { # TODO Nixify. config = mkIf cfg.enable { hm = { + imports = [ + inputs.nix-doom-emacs.hmModule + ]; + home = { packages = with pkgs; [ cmigemo # :lang japanese @@ -49,13 +54,20 @@ in { }; }; - programs.emacs = { - enable = true; - package = pkgs.emacs28.override {nativeComp = true;}; - extraPackages = p: - with p; [ - vterm # :term vterm - ]; + programs = { + emacs = { + enable = true; + # extraPackages = p: + # with p; [ + # vterm # :term vterm + # ]; + }; + + doom-emacs = { + enable = true; + doomPrivateDir = ./doom; + emacsPackage = pkgs.emacs28.override {nativeComp = true;}; + }; }; services.emacs = { diff --git a/modules/nixfiles/emacs/doom/config.el b/modules/nixfiles/emacs/doom/config.el new file mode 100644 index 0000000..d641e2d --- /dev/null +++ b/modules/nixfiles/emacs/doom/config.el @@ -0,0 +1,183 @@ +;;; config.el -*- lexical-binding: t; -*- + +(setq user-full-name "Azat Bahawi" + user-mail-address "frodo@gondor.net") + +(setq doom-theme 'doom-tomorrow-night) + +(setq doom-font (font-spec + :family "Iosevka" + :size 18)) + +(setq frame-title-format '("Emacs") + icon-title-format frame-title-format) + +(setq org-directory "~/doc/org/" + org-roam-directory "~/doc/roam/" + org-roam-db-location (concat org-roam-directory ".db")) +(setq deft-directory org-directory + deft-default-extension "org") + +(use-package! websocket + :after org-roam) + +(use-package! org-roam-ui + :after org-roam + :config + (setq org-roam-ui-sync-theme t + org-roam-ui-follow t + org-roam-ui-update-on-save t + org-roam-ui-open-on-start t)) + +(setq org-plantuml-jar-path "~/.local/share/plantuml/plantuml.jar") + +(setq migemo-dictionary "~/.local/share/migemo/utf-8/migemo-dict") + +(setq skk-large-jisyo "~/.local/share/skk/SKK-JISYO.L") + +(setq lsp-haskell-formatting-provider "brittany") + +(after! lsp-mode + (add-to-list 'lsp-language-id-configuration '(nix-mode . "nix")) + (lsp-register-client + (make-lsp-client :new-connection (lsp-stdio-connection '("rnix-lsp")) + :major-modes '(nix-mode) + :server-id 'nix)) + (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)) + +(add-hook 'org-mode-hook + (lambda (&rest _) + (setq fill-column 80))) +(add-hook 'org-mode-hook 'auto-fill-mode) + +(add-hook 'org-mode-hook + (lambda (&rest _) + (electric-indent-local-mode -1))) + +;; 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")) + elfeed-goodies/powerline-default-separator nil + elfeed-goodies/entry-pane-size 0.75 + elfeed-goodies/entry-pane-position 'bottom) + +(setq display-line-numbers-type t) + +(when (eq initial-window-system 'x) + (toggle-frame-maximized) + (toggle-frame-fullscreen)) + +(setq browse-url-generic-program (executable-find "firefox") + browse-url-browser-function 'browse-url-generic) + +(setq mu4e-root-maildir "~/mail" + mu4e-context-policy 'ask-if-none + mu4e-compose-context-policy 'always-ask + mu4e-compose--org-msg-toggle-next nil + sendmail-program (executable-find "msmtp") + send-mail-function #'smtpmail-send-it + message-sendmail-f-is-evil t + message-sendmail-extra-arguments '("--read-envelope-from") + message-send-mail-function #'message-send-mail-with-sendmail + +mu4e-personal-addresses (list "frodo@gondor.net" + "frodo@rohan.net" + "azahi@shire.me" + "a.gondor@yahoo.com" + "a.gondor@yahoo.com")) + + +(set-email-account! "shire" + '( + (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) + +(set-email-account! "yahoo" + '( + (mu4e-sent-folder . "/yahoo/Sent") + (mu4e-drafts-folder . "/yahoo/Drafts") + (mu4e-trash-folder . "/yahoo/Trash") + (mu4e-refile-folder . "/yahoo/Archive") + (smtpmail-smtp-user . "a.gondor")) + t) + +(setq circe-default-nick "azahi" + circe-default-realname "frodo@gondor.net" + circe-default-user circe-default-nick) + +(set-irc-server! "libera" + `( + :host "shire.me" + :port 6667 + :user "azahi/libera" + :pass (lambda (&rest _) + (+pass-get-secret "server/soju.manwe.shire.me/azahi")))) + +(set-irc-server! "oftc" + `( + :host "shire.me" + :port 6667 + :user "azahi/oftc" + :pass (lambda (&rest _) + (+pass-get-secret "server/soju.manwe.shire.me/azahi")))) + +(set-irc-server! "rizon" + `( + :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)) + +(use-package! kubernetes + :defer t + :commands (kubernetes-overview) + :init (setq kubernetes-poll-frequency 3600 + kubernetes-redraw-frequency 3600)) + +(use-package! kubernetes-evil + :after kubernetes-overview) + +(use-package! kubernetes-tramp + :defer t) + +(use-package! elpher + :init (setq elpher-default-url-type "gemini")) + +(provide 'config) +;;; config.el ends here diff --git a/modules/nixfiles/emacs/doom/custom.el b/modules/nixfiles/emacs/doom/custom.el new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/modules/nixfiles/emacs/doom/custom.el diff --git a/modules/nixfiles/emacs/doom/init.el b/modules/nixfiles/emacs/doom/init.el new file mode 100644 index 0000000..486010a --- /dev/null +++ b/modules/nixfiles/emacs/doom/init.el @@ -0,0 +1,134 @@ +;;; init.el -*- lexical-binding: t; -*- + +(doom! + :input + japanese + + :completion + company + vertico + + :ui + deft + doom + ;; doom-dashboard + ;; doom-quit + ;; (emoji +unicode) + hl-todo + hydra + indent-guides + ;; ligatures + ;; (modeline +light) + nav-flash + ophints + (popup +defaults) + ;; tabs + ;; treemacs + unicode + vc-gutter + vi-tilde-fringe + window-select + workspaces + zen + + :editor + (evil +everywhere) + file-templates + fold + (format +onsave) + lispy + multiple-cursors + (objed +manual) + parinfer + rotate-text + snippets + word-wrap + + :emacs + dired + electric + ibuffer + (undo +tree) + vc + + :term + eshell + vterm + + :checkers + syntax + (spell +flyspell) + grammar + + :tools + ansible + debugger + direnv + (docker +lsp) + editorconfig + (eval +overlay) + (lookup +dictionary +offline) + (lsp +peek) + magit + make + (pass +auth) + pdf + ;; rgb + ;; taskrunner + terraform + tmux + upload + + :os + (tty +osc) + + :lang + (cc +lsp) + common-lisp + ;; (csharp +lsp) + data + dhall + emacs-lisp + (go +lsp) + (haskell +lsp) + ;; (java +lsp) + ;; (javascript +lsp) + (json +lsp) + (latex +lsp) + ;; (lua +lsp) + markdown + nix + (org + +brain + +dragndrop + +gnuplot + +hugo + +journal + +noter + +pandoc + +pomodoro + +present + +roam2) + plantuml + ;; (php +lsp) + (python +lsp) + (racket +lsp) + ;; (rust +lsp) + (scheme +racket) + (sh +lsp) + web + (yaml +lsp) + (zig +lsp) + + :email + mu4e + + :app + calendar + emms + everywhere + irc + (rss +org) + + :config + (default +bindings +smartparens)) diff --git a/modules/nixfiles/emacs/doom/packages.el b/modules/nixfiles/emacs/doom/packages.el new file mode 100644 index 0000000..72c3945 --- /dev/null +++ b/modules/nixfiles/emacs/doom/packages.el @@ -0,0 +1,23 @@ +;;; packages.el -*- no-byte-compile: t; -*- + +(package! hledger-mode) + +(package! kubernetes) +(package! kubernetes-evil) +(package! kubernetes-tramp) + +(package! elpher) + +(unpin! org-roam) +(package! org-roam + :recipe (:host github + :repo "org-roam/org-roam" + :branch "main" + :files (:defaults "extensions/*"))) +(package! org-roam-ui + :recipe (:host github + :repo "org-roam/org-roam-ui" + :branch "main" + :files ("*.el" "out"))) + +(package! modus-themes) |