From a0ebcbe95aee9cfd191419bf171b4b658ab20194 Mon Sep 17 00:00:00 2001 From: Preston Pan Date: Sun, 26 Apr 2026 16:14:21 -0700 Subject: routine cleanup --- config/nix.org | 73 ++++++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 56 insertions(+), 17 deletions(-) (limited to 'config/nix.org') diff --git a/config/nix.org b/config/nix.org index 71d9b4c..9c92f06 100644 --- a/config/nix.org +++ b/config/nix.org @@ -96,6 +96,10 @@ and now for the main flake: url = "github:catppuccin/qutebrowser"; flake = false; }; + lean4-mode-src = { + url = "github:leanprover-community/lean4-mode"; + flake = false; + }; }; outputs = { @@ -3538,26 +3542,58 @@ as an org file which gets automatically tangled to an emacs-lisp file. enable = lib.mkDefault config.monorepo.profiles.graphics.enable; package = pkgs.emacs-pgtk; extraConfig = '' - (setq debug-on-error t) - (setq logo-file "${self}/data/logo.png") - (setq system-email "${super.monorepo.vars.email}") - (setq system-username "${super.monorepo.vars.internetName}") - (setq system-fullname "${super.monorepo.vars.fullName}") - (setq system-gpgkey "${super.monorepo.vars.gpgKey}") - (setq my-ispell-dictionary "${pkgs.scowl}/share/dict/words.txt") - (setq my-ispell-args '( - "--encoding=iso-8859-1" - "--mode=url" - "--data-dir=${pkgs.aspell}/lib/aspell" - "--dict-dir=${pkgs.aspellDicts.en}/lib/aspell")) - - (load "${pkgs.writeText "init.el" (builtins.readFile ../../init.el)}") - ''; - - extraPackages = import ./emacs-packages.nix; + (setq debug-on-error t) + (setq logo-file "${self}/data/logo.png") + (setq system-email "${super.monorepo.vars.email}") + (setq system-username "${super.monorepo.vars.internetName}") + (setq system-fullname "${super.monorepo.vars.fullName}") + (setq system-gpgkey "${super.monorepo.vars.gpgKey}") + (setq my-ispell-dictionary "${pkgs.scowl}/share/dict/words.txt") + (setq my-ispell-args '( + "--encoding=iso-8859-1" + "--mode=url" + "--data-dir=${pkgs.aspell}/lib/aspell" + "--dict-dir=${pkgs.aspellDicts.en}/lib/aspell")) + + (load "${pkgs.writeText "init.el" (builtins.readFile ../../init.el)}") + ''; + extraPackages = epkgs: + let + # 1. Import the new file and pass it the required arguments + lean4-mode-pinned = import ../../user-packages/lean4.nix { + inherit epkgs; + lean4-src = self.inputs.lean4-mode-src; + }; + + # 2. Import your standard packages + basePackages = import ./emacs-packages.nix epkgs; + in + basePackages ++ [ lean4-mode-pinned ]; }; } #+end_src +**** Lean4-Mode +#+begin_src nix :tangle ../nix/user-packages/lean4.nix +{ epkgs, lean4-src }: + +epkgs.trivialBuild { + pname = "lean4-mode"; + version = "pinned"; + src = lean4-src; + + packageRequires = with epkgs; [ + lsp-mode + magit-section + dash + f + s + ]; + + postInstall = '' + cp -r data $out/share/emacs/site-lisp/ + ''; +} +#+end_src **** Emacs Packages I want to separate out these packages so that my parent flake which builds my website has a list of my packages. #+begin_src nix :tangle ../nix/modules/home/emacs-packages.nix @@ -3575,6 +3611,7 @@ epkgs: with epkgs; [ dap-mode dash dashboard + envrc doom-themes doom-modeline indent-bars @@ -3590,6 +3627,7 @@ epkgs: with epkgs; [ engrave-faces enwc evil + evil-indent-plus evil-collection evil-commentary evil-multiedit @@ -4214,6 +4252,7 @@ for these configurations. libnotify htop minify + direnv python3Packages.adblock (pkgs.writeShellScriptBin "help" -- cgit v1.3