gui: re-enable emacs

This commit is contained in:
Aaron Bieber 2024-02-08 13:34:17 -07:00
parent 20df427084
commit 0e2faa33c6
No known key found for this signature in database
6 changed files with 154 additions and 88 deletions

View File

@ -1,12 +1,11 @@
{ runCommand { runCommand
, emacsWithPackagesFromUsePackage , emacsWithPackagesFromUsePackage
, pkgs , pkgs
, lib
, makeWrapper , makeWrapper
, mu , mu
, writeTextDir , writeTextDir
, emacs , emacs
, emacsPkg ? pkgs.emacsPgtkNativeComp , emacsPkg ? pkgs.emacs-gtk
, ... , ...
}: }:
let let
@ -31,10 +30,6 @@ let
# init.el to load my config and other dependencies. # init.el to load my config and other dependencies.
emacsInit = writeTextDir "share/emacs/site-lisp/init.el" '' 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}") (message "Loading my 'emacs.org' config from: ${emacsConfig}")
(load "${emacsConfig}/emacs.el") (load "${emacsConfig}/emacs.el")
''; '';
@ -45,8 +40,6 @@ let
go-font go-font
graphviz graphviz
ispell ispell
isync
mu
texlive.combined.scheme-full texlive.combined.scheme-full
]; ];
in in

View File

@ -1099,74 +1099,74 @@ mu init --muhome=/home/qbit/.mu -m /home/qbit/Maildir/fastmail/ --my-address="aa
** mu4e specific configs ** mu4e specific configs
#+begin_src emacs-lisp #+begin_src emacs-lisp
(require 'mu4e) ;;(require 'mu4e)
(require 'mu4e-speedbar) ;;(require 'mu4e-speedbar)
(require 'org-mu4e) ;;(require 'org-mu4e)
(setq mail-user-agent 'mu4e-user-agent ;;(setq mail-user-agent 'mu4e-user-agent
mu4e-get-mail-command "mbsync fastmail" ;; mu4e-get-mail-command "mbsync fastmail"
mu4e-update-interval 420 ;; mu4e-update-interval 420
mu4e-compose-context-policy nil ;; mu4e-compose-context-policy nil
mu4e-context-policy 'pick-first ;; mu4e-context-policy 'pick-first
mu4e-drafts-folder "/Drafts" ;; mu4e-drafts-folder "/Drafts"
mu4e-sent-folder "/Sent Items" ;; mu4e-sent-folder "/Sent Items"
mu4e-trash-folder "/Trash" ;; mu4e-trash-folder "/Trash"
mu4e-maildir-shortcuts ;; mu4e-maildir-shortcuts
'( ("/INBOX" . ?i) ;; '( ("/INBOX" . ?i)
("/Archive" . ?a) ;; ("/Archive" . ?a)
("/Sent Items" . ?s)) ;; ("/Sent Items" . ?s))
org-mu4e-link-query-in-headers-mode nil ;; org-mu4e-link-query-in-headers-mode nil
mu4e-attachment-dir ;; mu4e-attachment-dir
(lambda (fname mtype) ;; (lambda (fname mtype)
(cond ;; (cond
((and fname (string-match "\\.diff$" fname)) "~/patches") ;; ((and fname (string-match "\\.diff$" fname)) "~/patches")
((and fname (string-match "\\.patch$" fname)) "~/patches") ;; ((and fname (string-match "\\.patch$" fname)) "~/patches")
((and fname (string-match "\\.diff.gz$" fname)) "~/patches") ;; ((and fname (string-match "\\.diff.gz$" fname)) "~/patches")
(t "~/Downloads"))) ;; (t "~/Downloads")))
mu4e-bookmarks ;; mu4e-bookmarks
`(( :name "Inbox" ;; `(( :name "Inbox"
:query "maildir:/Inbox AND NOT flag:trashed" ;; :query "maildir:/Inbox AND NOT flag:trashed"
:key ?i) ;; :key ?i)
( :name "TODO" ;; ( :name "TODO"
:query "maildir:/TODO AND NOT flag:trashed" ;; :query "maildir:/TODO AND NOT flag:trashed"
:key ?T) ;; :key ?T)
( :name "Unread messages" ;; ( :name "Unread messages"
:query "flag:unread AND NOT flag:trashed AND NOT list:ports-changes.openbsd.org AND NOT list:source-changes.openbsd.org" ;; :query "flag:unread AND NOT flag:trashed AND NOT list:ports-changes.openbsd.org AND NOT list:source-changes.openbsd.org"
:key ?u) ;; :key ?u)
( :name "Today's messages" ;; ( :name "Today's messages"
:query (concat ;; :query (concat
"date:today..now" ;; "date:today..now"
" AND NOT flag:trashed" ;; " AND NOT flag:trashed"
" AND NOT list:ports-changes.openbsd.org" ;; " AND NOT list:ports-changes.openbsd.org"
" AND NOT list:source-changes.openbsd.org") ;; " AND NOT list:source-changes.openbsd.org")
:key ?d) ;; :key ?d)
( :name "Last 7 days" ;; ( :name "Last 7 days"
:query (concat ;; :query (concat
"date:6d..now" ;; "date:6d..now"
" AND NOT flag:trashed" ;; " AND NOT flag:trashed"
" AND NOT list:ports-changes.openbsd.org" ;; " AND NOT list:ports-changes.openbsd.org"
" AND NOT list:source-changes.openbsd.org") ;; " AND NOT list:source-changes.openbsd.org")
:key ?w) ;; :key ?w)
( :name "Hackers" ;; ( :name "Hackers"
:query "list:hackers.openbsd.org AND NOT flag:trashed" ;; :query "list:hackers.openbsd.org AND NOT flag:trashed"
:key ?h) ;; :key ?h)
( :name "Bugs" ;; ( :name "Bugs"
:query "list:bugs.openbsd.org AND NOT flag:trashed" ;; :query "list:bugs.openbsd.org AND NOT flag:trashed"
:key ?b) ;; :key ?b)
( :name "Tech" ;; ( :name "Tech"
:query "list:tech.openbsd.org AND NOT flag:trashed" ;; :query "list:tech.openbsd.org AND NOT flag:trashed"
:key ?t) ;; :key ?t)
( :name "Ports" ;; ( :name "Ports"
:query "list:ports.openbsd.org AND NOT flag:trashed" ;; :query "list:ports.openbsd.org AND NOT flag:trashed"
:key ?p) ;; :key ?p)
( :name "Misc" ;; ( :name "Misc"
:query "list:misc.openbsd.org AND NOT flag:trashed" ;; :query "list:misc.openbsd.org AND NOT flag:trashed"
:key ?m) ;; :key ?m)
( :name "9front" ;; ( :name "9front"
:query "list:9front.9front.org AND NOT flag:trashed" ;; :query "list:9front.9front.org AND NOT flag:trashed"
:key ?9) ;; :key ?9)
( :name "GOT" ;; ( :name "GOT"
:query "list:gameoftrees.openbsd.org AND NOT flag:trashed" ;; :query "list:gameoftrees.openbsd.org AND NOT flag:trashed"
:key ?g))) ;; :key ?g)))
#+end_src #+end_src
* org-mode * org-mode

75
flake.lock generated
View File

@ -56,6 +56,29 @@
"type": "github" "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-compat": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -89,6 +112,24 @@
} }
}, },
"flake-utils": { "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": { "locked": {
"lastModified": 1634851050, "lastModified": 1634851050,
"narHash": "sha256-N83GlSGPJJdcqhUxSCS/WwW5pksYf3VP1M13cDRTSVA=", "narHash": "sha256-N83GlSGPJJdcqhUxSCS/WwW5pksYf3VP1M13cDRTSVA=",
@ -220,10 +261,26 @@
"type": "indirect" "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": { "peerix": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
"flake-utils": "flake-utils", "flake-utils": "flake-utils_2",
"nixpkgs": [ "nixpkgs": [
"stable" "stable"
] ]
@ -306,6 +363,7 @@
"inputs": { "inputs": {
"beyt": "beyt", "beyt": "beyt",
"darwin": "darwin", "darwin": "darwin",
"emacs-overlay": "emacs-overlay",
"gostart": "gostart", "gostart": "gostart",
"gqrss": "gqrss", "gqrss": "gqrss",
"microca": "microca", "microca": "microca",
@ -403,6 +461,21 @@
"type": "indirect" "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": { "taskobs": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [

View File

@ -18,10 +18,10 @@
inputs.sops-nix.follows = "sops-nix"; inputs.sops-nix.follows = "sops-nix";
}; };
#emacs-overlay = { emacs-overlay = {
# url = "github:nix-community/emacs-overlay/d54a1521619daa37c9aa8c9e3362abb34e676007"; url = "github:nix-community/emacs-overlay/64a633659fab447f12c898a32c451f88b5c3c048";
# inputs.nixpkgs.follows = "stable"; inputs.nixpkgs.follows = "unstable";
#}; };
darwin = { darwin = {
url = "github:lnl7/nix-darwin"; url = "github:lnl7/nix-darwin";
@ -137,7 +137,7 @@
}; };
overlays = [ overlays = [
#inputs.emacs-overlay.overlay inputs.emacs-overlay.overlay
inputs.gostart.overlay inputs.gostart.overlay
inputs.microca.overlay inputs.microca.overlay
inputs.peerix.overlay inputs.peerix.overlay

View File

@ -11,6 +11,7 @@ let
inherit (inputs.traygent.packages.${pkgs.system}) traygent; inherit (inputs.traygent.packages.${pkgs.system}) traygent;
inherit (inputs.beyt.packages.${pkgs.system}) beyt; inherit (inputs.beyt.packages.${pkgs.system}) beyt;
firefox = import ../configs/firefox.nix { inherit pkgs; }; firefox = import ../configs/firefox.nix { inherit pkgs; };
myEmacs = pkgs.callPackage ../configs/emacs.nix { };
rage = pkgs.writeScriptBin "rage" (import ../bins/rage.nix { inherit pkgs; }); rage = pkgs.writeScriptBin "rage" (import ../bins/rage.nix { inherit pkgs; });
rpr = rpr =
pkgs.writeScriptBin "rpr" pkgs.writeScriptBin "rpr"
@ -87,6 +88,11 @@ with lib; {
services = { services = {
xserver.enable = true; xserver.enable = true;
pcscd.enable = true; pcscd.enable = true;
emacs = {
enable = true;
package = myEmacs;
install = true;
};
}; };
documentation.enable = true; documentation.enable = true;

View File

@ -9,7 +9,6 @@ let
inherit (inputs.stable.legacyPackages.${pkgs.system}) chirp beets; inherit (inputs.stable.legacyPackages.${pkgs.system}) chirp beets;
inherit (builtins) readFile; inherit (builtins) readFile;
inherit (xinlib) jobToUserService todo; inherit (xinlib) jobToUserService todo;
#myEmacs = pkgs.callPackage ../../configs/emacs.nix { };
#doom-emacs = inputs.nix-doom-emacs.packages.${pkgs.system}.default.override { #doom-emacs = inputs.nix-doom-emacs.packages.${pkgs.system}.default.override {
# doomPrivateDir = ../../configs/doom.d; # doomPrivateDir = ../../configs/doom.d;
#}; #};
@ -243,11 +242,6 @@ in
pcscd.enable = true; pcscd.enable = true;
vnstat.enable = true; vnstat.enable = true;
clamav.updater.enable = true; clamav.updater.enable = true;
#emacs = {
# enable = true;
# package = myEmacs;
# install = true;
#};
tor = { tor = {
enable = true; enable = true;
client.enable = true; client.enable = true;