diff --git a/configs/emacs.nix b/configs/emacs.nix index dae89b8..6f23268 100644 --- a/configs/emacs.nix +++ b/configs/emacs.nix @@ -1,12 +1,11 @@ { runCommand , emacsWithPackagesFromUsePackage , pkgs -, lib , makeWrapper , mu , writeTextDir , emacs -, emacsPkg ? pkgs.emacsPgtkNativeComp +, emacsPkg ? pkgs.emacs-gtk , ... }: let @@ -31,10 +30,6 @@ let # init.el to load my config and other dependencies. emacsInit = writeTextDir "share/emacs/site-lisp/init.el" '' - (message "Loading my 'mu4e' from: ${muDir}") - (add-to-list 'load-path "${muDir}") - (load "${muDir}/mu4e.el") - (message "Loading my 'emacs.org' config from: ${emacsConfig}") (load "${emacsConfig}/emacs.el") ''; @@ -45,8 +40,6 @@ let go-font graphviz ispell - isync - mu texlive.combined.scheme-full ]; in diff --git a/configs/emacs.org b/configs/emacs.org index 79b69e6..022b376 100644 --- a/configs/emacs.org +++ b/configs/emacs.org @@ -1099,74 +1099,74 @@ mu init --muhome=/home/qbit/.mu -m /home/qbit/Maildir/fastmail/ --my-address="aa ** mu4e specific configs #+begin_src emacs-lisp - (require 'mu4e) - (require 'mu4e-speedbar) - (require 'org-mu4e) - (setq mail-user-agent 'mu4e-user-agent - mu4e-get-mail-command "mbsync fastmail" - mu4e-update-interval 420 - mu4e-compose-context-policy nil - mu4e-context-policy 'pick-first - mu4e-drafts-folder "/Drafts" - mu4e-sent-folder "/Sent Items" - mu4e-trash-folder "/Trash" - mu4e-maildir-shortcuts - '( ("/INBOX" . ?i) - ("/Archive" . ?a) - ("/Sent Items" . ?s)) - org-mu4e-link-query-in-headers-mode nil - mu4e-attachment-dir - (lambda (fname mtype) - (cond - ((and fname (string-match "\\.diff$" fname)) "~/patches") - ((and fname (string-match "\\.patch$" fname)) "~/patches") - ((and fname (string-match "\\.diff.gz$" fname)) "~/patches") - (t "~/Downloads"))) - mu4e-bookmarks - `(( :name "Inbox" - :query "maildir:/Inbox AND NOT flag:trashed" - :key ?i) - ( :name "TODO" - :query "maildir:/TODO AND NOT flag:trashed" - :key ?T) - ( :name "Unread messages" - :query "flag:unread AND NOT flag:trashed AND NOT list:ports-changes.openbsd.org AND NOT list:source-changes.openbsd.org" - :key ?u) - ( :name "Today's messages" - :query (concat - "date:today..now" - " AND NOT flag:trashed" - " AND NOT list:ports-changes.openbsd.org" - " AND NOT list:source-changes.openbsd.org") - :key ?d) - ( :name "Last 7 days" - :query (concat - "date:6d..now" - " AND NOT flag:trashed" - " AND NOT list:ports-changes.openbsd.org" - " AND NOT list:source-changes.openbsd.org") - :key ?w) - ( :name "Hackers" - :query "list:hackers.openbsd.org AND NOT flag:trashed" - :key ?h) - ( :name "Bugs" - :query "list:bugs.openbsd.org AND NOT flag:trashed" - :key ?b) - ( :name "Tech" - :query "list:tech.openbsd.org AND NOT flag:trashed" - :key ?t) - ( :name "Ports" - :query "list:ports.openbsd.org AND NOT flag:trashed" - :key ?p) - ( :name "Misc" - :query "list:misc.openbsd.org AND NOT flag:trashed" - :key ?m) - ( :name "9front" - :query "list:9front.9front.org AND NOT flag:trashed" - :key ?9) - ( :name "GOT" - :query "list:gameoftrees.openbsd.org AND NOT flag:trashed" - :key ?g))) + ;;(require 'mu4e) + ;;(require 'mu4e-speedbar) + ;;(require 'org-mu4e) + ;;(setq mail-user-agent 'mu4e-user-agent + ;; mu4e-get-mail-command "mbsync fastmail" + ;; mu4e-update-interval 420 + ;; mu4e-compose-context-policy nil + ;; mu4e-context-policy 'pick-first + ;; mu4e-drafts-folder "/Drafts" + ;; mu4e-sent-folder "/Sent Items" + ;; mu4e-trash-folder "/Trash" + ;; mu4e-maildir-shortcuts + ;; '( ("/INBOX" . ?i) + ;; ("/Archive" . ?a) + ;; ("/Sent Items" . ?s)) + ;; org-mu4e-link-query-in-headers-mode nil + ;; mu4e-attachment-dir + ;; (lambda (fname mtype) + ;; (cond + ;; ((and fname (string-match "\\.diff$" fname)) "~/patches") + ;; ((and fname (string-match "\\.patch$" fname)) "~/patches") + ;; ((and fname (string-match "\\.diff.gz$" fname)) "~/patches") + ;; (t "~/Downloads"))) + ;; mu4e-bookmarks + ;; `(( :name "Inbox" + ;; :query "maildir:/Inbox AND NOT flag:trashed" + ;; :key ?i) + ;; ( :name "TODO" + ;; :query "maildir:/TODO AND NOT flag:trashed" + ;; :key ?T) + ;; ( :name "Unread messages" + ;; :query "flag:unread AND NOT flag:trashed AND NOT list:ports-changes.openbsd.org AND NOT list:source-changes.openbsd.org" + ;; :key ?u) + ;; ( :name "Today's messages" + ;; :query (concat + ;; "date:today..now" + ;; " AND NOT flag:trashed" + ;; " AND NOT list:ports-changes.openbsd.org" + ;; " AND NOT list:source-changes.openbsd.org") + ;; :key ?d) + ;; ( :name "Last 7 days" + ;; :query (concat + ;; "date:6d..now" + ;; " AND NOT flag:trashed" + ;; " AND NOT list:ports-changes.openbsd.org" + ;; " AND NOT list:source-changes.openbsd.org") + ;; :key ?w) + ;; ( :name "Hackers" + ;; :query "list:hackers.openbsd.org AND NOT flag:trashed" + ;; :key ?h) + ;; ( :name "Bugs" + ;; :query "list:bugs.openbsd.org AND NOT flag:trashed" + ;; :key ?b) + ;; ( :name "Tech" + ;; :query "list:tech.openbsd.org AND NOT flag:trashed" + ;; :key ?t) + ;; ( :name "Ports" + ;; :query "list:ports.openbsd.org AND NOT flag:trashed" + ;; :key ?p) + ;; ( :name "Misc" + ;; :query "list:misc.openbsd.org AND NOT flag:trashed" + ;; :key ?m) + ;; ( :name "9front" + ;; :query "list:9front.9front.org AND NOT flag:trashed" + ;; :key ?9) + ;; ( :name "GOT" + ;; :query "list:gameoftrees.openbsd.org AND NOT flag:trashed" + ;; :key ?g))) #+end_src * org-mode diff --git a/flake.lock b/flake.lock index f91b8da..f6b98a2 100644 --- a/flake.lock +++ b/flake.lock @@ -56,6 +56,29 @@ "type": "github" } }, + "emacs-overlay": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": [ + "unstable" + ], + "nixpkgs-stable": "nixpkgs-stable" + }, + "locked": { + "lastModified": 1707411167, + "narHash": "sha256-0JViztrDcglHQnStH2jjFV2O0NEFx7a/CmPzgTXpzaM=", + "owner": "nix-community", + "repo": "emacs-overlay", + "rev": "64a633659fab447f12c898a32c451f88b5c3c048", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "emacs-overlay", + "rev": "64a633659fab447f12c898a32c451f88b5c3c048", + "type": "github" + } + }, "flake-compat": { "flake": false, "locked": { @@ -89,6 +112,24 @@ } }, "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1705309234, + "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { "locked": { "lastModified": 1634851050, "narHash": "sha256-N83GlSGPJJdcqhUxSCS/WwW5pksYf3VP1M13cDRTSVA=", @@ -220,10 +261,26 @@ "type": "indirect" } }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1707238373, + "narHash": "sha256-WKxT0yLzWbFZwYi92lI0yWJpYtRaFSWHGX8QXzejapw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "fb0c047e30b69696acc42e669d02452ca1b55755", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-23.11", + "repo": "nixpkgs", + "type": "github" + } + }, "peerix": { "inputs": { "flake-compat": "flake-compat", - "flake-utils": "flake-utils", + "flake-utils": "flake-utils_2", "nixpkgs": [ "stable" ] @@ -306,6 +363,7 @@ "inputs": { "beyt": "beyt", "darwin": "darwin", + "emacs-overlay": "emacs-overlay", "gostart": "gostart", "gqrss": "gqrss", "microca": "microca", @@ -403,6 +461,21 @@ "type": "indirect" } }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "taskobs": { "inputs": { "nixpkgs": [ diff --git a/flake.nix b/flake.nix index ada5c41..c1e01f9 100644 --- a/flake.nix +++ b/flake.nix @@ -18,10 +18,10 @@ inputs.sops-nix.follows = "sops-nix"; }; - #emacs-overlay = { - # url = "github:nix-community/emacs-overlay/d54a1521619daa37c9aa8c9e3362abb34e676007"; - # inputs.nixpkgs.follows = "stable"; - #}; + emacs-overlay = { + url = "github:nix-community/emacs-overlay/64a633659fab447f12c898a32c451f88b5c3c048"; + inputs.nixpkgs.follows = "unstable"; + }; darwin = { url = "github:lnl7/nix-darwin"; @@ -137,7 +137,7 @@ }; overlays = [ - #inputs.emacs-overlay.overlay + inputs.emacs-overlay.overlay inputs.gostart.overlay inputs.microca.overlay inputs.peerix.overlay diff --git a/gui/default.nix b/gui/default.nix index ac8633f..f50064e 100644 --- a/gui/default.nix +++ b/gui/default.nix @@ -11,6 +11,7 @@ let inherit (inputs.traygent.packages.${pkgs.system}) traygent; inherit (inputs.beyt.packages.${pkgs.system}) beyt; firefox = import ../configs/firefox.nix { inherit pkgs; }; + myEmacs = pkgs.callPackage ../configs/emacs.nix { }; rage = pkgs.writeScriptBin "rage" (import ../bins/rage.nix { inherit pkgs; }); rpr = pkgs.writeScriptBin "rpr" @@ -87,6 +88,11 @@ with lib; { services = { xserver.enable = true; pcscd.enable = true; + emacs = { + enable = true; + package = myEmacs; + install = true; + }; }; documentation.enable = true; diff --git a/hosts/europa/default.nix b/hosts/europa/default.nix index e14f523..4fd1f62 100644 --- a/hosts/europa/default.nix +++ b/hosts/europa/default.nix @@ -9,7 +9,6 @@ let inherit (inputs.stable.legacyPackages.${pkgs.system}) chirp beets; inherit (builtins) readFile; inherit (xinlib) jobToUserService todo; - #myEmacs = pkgs.callPackage ../../configs/emacs.nix { }; #doom-emacs = inputs.nix-doom-emacs.packages.${pkgs.system}.default.override { # doomPrivateDir = ../../configs/doom.d; #}; @@ -243,11 +242,6 @@ in pcscd.enable = true; vnstat.enable = true; clamav.updater.enable = true; - #emacs = { - # enable = true; - # package = myEmacs; - # install = true; - #}; tor = { enable = true; client.enable = true;