summaryrefslogtreecommitdiff
path: root/config/nix.org
diff options
context:
space:
mode:
authorPreston Pan <ret2pop@nullring.xyz>2026-04-26 16:14:21 -0700
committerPreston Pan <ret2pop@nullring.xyz>2026-04-26 16:14:21 -0700
commita0ebcbe95aee9cfd191419bf171b4b658ab20194 (patch)
tree254912fe915957782cedd633e516deb667c77f6c /config/nix.org
parent5b8652b795d154e90fa782198d0624fe49f34f90 (diff)
routine cleanup
Diffstat (limited to 'config/nix.org')
-rw-r--r--config/nix.org71
1 files changed, 55 insertions, 16 deletions
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"))
+ (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;
+ (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"