{ pkgs, config, lib, secret, inputs', ... }: { home.packages = with pkgs; [ (makeDesktopItem { name = "Org-Protocol"; exec = "emacsclient %u"; comment = "Org protocol"; desktopName = "org-protocol"; type = "Application"; mimeTypes = ["x-scheme-handler/org-protocol"]; }) (iosevka-bin.override {variant = "aile";}) (iosevka-bin.override {variant = "etoile";}) (iosevka-bin.override {variant = "";}) emacs-all-the-icons-fonts emacs-master-nativecomp ]; systemd.user.services.emacs = { Unit = { Description = "Emacs, the extensible editor"; After = [ "graphical-session-pre.target" ]; PartOf = [ "graphical-session.target" ]; }; Service = { Type = "simple"; ExecStart = ''/bin/sh -l -c "emacs --fg-daemon"''; }; Install = { WantedBy = [ "graphical-session.target" ]; }; }; home.file = { ".emacs".source = ./.emacs; ".mbsyncrc".source = secret.emacs.mbsyncrc or ./.; ".emacs.d/org" = { source = ./.emacs.d/org; recursive = true; }; ".emacs.d/lisp" = { source = ./.emacs.d/lisp; recursive = true; }; ".emacs.d/mu4e-contexts".source = secret.emacs.mu4eContexts or ./.; ".emacs.d/tree-sitter".source = pkgs.tree-sitter-grammars; ".emacs.d/vterm-module".source = pkgs.stdenv.mkDerivation { name = "vterm-emacs"; src = inputs'.vtermModule; buildInputs = with pkgs; [cmake libtool glib.dev libvterm-neovim]; cmakeFlags = [ "-DEMACS_SOURCE=${inputs'.emacs}" "-DUSE_SYSTEM_LIBVTERM=ON" ]; installPhase = '' mkdir -p $out/lib install ../vterm-module.so $out/lib ''; }; ".emacs.d/profile".source = pkgs.buildEnv { name = "emacs-env"; paths = with pkgs; [ cmake ninja gnumake gcc mu mu.mu4e ripgrep fd isync imagemagick texlive.combined.scheme-full (hunspellWithDicts (with hunspellDicts; [ sk-sk en-us ])) ledger-compat python311Packages.pygments hledger (rWrapper.override{ packages = with rPackages; [ ggplot2 ascii car ]; }) xclip ]; }; }; }