Adding import ./emacs.nix
This commit is contained in:
+85
-65
@@ -1770,72 +1770,92 @@ This sets up the zsh terminal
|
|||||||
** =generated/system/applications/terminal_shell/emacs.nix=
|
** =generated/system/applications/terminal_shell/emacs.nix=
|
||||||
This sets up the emacs terminal
|
This sets up the emacs terminal
|
||||||
#+BEGIN_SRC nix :tangle generated/system/applications/terminal_shell/emacs.nix :noweb tangle :mkdirp yes :eval never-html
|
#+BEGIN_SRC nix :tangle generated/system/applications/terminal_shell/emacs.nix :noweb tangle :mkdirp yes :eval never-html
|
||||||
{ pkgs, ... }:
|
{ pkgs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
programs.emacs = {
|
programs.emacs = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# install with tree sitter enabled
|
package = pkgs.emacs-pgtk.override { withTreeSitter = true; };
|
||||||
package = (pkgs.emacs-pgtk.override { withTreeSitter = true; });
|
|
||||||
extraPackages = epkgs: [
|
# Group related packages for clarity and easier maintenance
|
||||||
# also install all tree sitter grammars
|
extraPackages = epkgs: with epkgs; [
|
||||||
epkgs.manualPackages.treesit-grammars.with-all-grammars
|
# Tree-sitter and language support
|
||||||
epkgs.nerd-icons # nerd fonts support
|
manualPackages.treesit-grammars.with-all-grammars
|
||||||
epkgs.doom-modeline # model line
|
rust-mode
|
||||||
epkgs.diminish # hides modes from modeline
|
rustic
|
||||||
epkgs.eldoc # doc support
|
nix-mode
|
||||||
epkgs.pulsar # pulses the cursor when jumping about
|
hcl-mode
|
||||||
epkgs.which-key # help porcelain
|
|
||||||
epkgs.expreg # expand region
|
# UI/UX and navigation
|
||||||
epkgs.vundo # undo tree
|
nerd-icons
|
||||||
epkgs.puni # structured editing
|
doom-modeline
|
||||||
epkgs.avy # jumping utility
|
diminish
|
||||||
epkgs.consult # emacs right click
|
eldoc
|
||||||
epkgs.vertico # minibuffer completion
|
eldoc-box
|
||||||
epkgs.marginalia # annotations for completions
|
pulsar
|
||||||
epkgs.crux # utilities
|
which-key
|
||||||
epkgs.magit # git porcelain
|
avy
|
||||||
epkgs.nerd-icons-corfu # nerd icons for completion
|
consult
|
||||||
epkgs.corfu # completion
|
vertico
|
||||||
epkgs.cape # completion extensions
|
marginalia
|
||||||
epkgs.orderless # search paradigm
|
crux
|
||||||
epkgs.yasnippet # snippets support
|
shell-pop
|
||||||
epkgs.yasnippet-snippets # commonly used snippets
|
|
||||||
epkgs.rg # ripgrep
|
# Completion and snippets
|
||||||
epkgs.exec-path-from-shell # load env and path
|
nerd-icons-corfu
|
||||||
epkgs.eat # better shell
|
corfu
|
||||||
epkgs.rust-mode # rust mode (when rust-ts doesn't cut it)
|
cape
|
||||||
epkgs.rustic # more rust things
|
orderless
|
||||||
epkgs.nix-mode # nix lang
|
yasnippet
|
||||||
epkgs.hcl-mode # hashicorp file mode
|
yasnippet-snippets
|
||||||
epkgs.shell-pop # quick shell popup
|
|
||||||
epkgs.envrc # support for loading .envrc
|
# Utilities and tools
|
||||||
epkgs.nixpkgs-fmt # format nix files
|
rg
|
||||||
epkgs.f # string + file utilities
|
exec-path-from-shell
|
||||||
epkgs.gptel # llm chat (mainly claude)
|
eat
|
||||||
epkgs.catppuccin-theme # catppuccin theme
|
f
|
||||||
epkgs.eldoc-box # docs in a box
|
gptel
|
||||||
epkgs.sideline # mainly for flymake errors on the side
|
nixpkgs-fmt
|
||||||
epkgs.sideline-flymake # mainly for flymake errors on the side
|
envrc
|
||||||
epkgs.sideline-eglot # mainly for flymake errors on the side
|
|
||||||
];
|
# Theming
|
||||||
};
|
catppuccin-theme
|
||||||
home.sessionVariables = {
|
|
||||||
EDITOR = "emacs";
|
# Git
|
||||||
XDG_SCREENSHOTS_DIR = "~/screenshots";
|
magit
|
||||||
};
|
|
||||||
home.file = {
|
# Editing and workflow
|
||||||
emacs-init = {
|
expreg
|
||||||
source = ./early-init.el;
|
vundo
|
||||||
target = ".emacs.d/early-init.el";
|
puni
|
||||||
};
|
|
||||||
emacs = {
|
# Error and side panel support
|
||||||
source = ./init.el;
|
sideline
|
||||||
target = ".emacs.d/init.el";
|
sideline-flymake
|
||||||
};
|
sideline-eglot
|
||||||
};
|
];
|
||||||
services.nextcloud-client = {
|
};
|
||||||
enable = true;
|
|
||||||
};
|
# Home Manager session variables
|
||||||
|
home.sessionVariables = {
|
||||||
|
EDITOR = "emacs";
|
||||||
|
XDG_SCREENSHOTS_DIR = "${pkgs.lib.getHome}/screenshots";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Home Manager file management
|
||||||
|
home.file = {
|
||||||
|
"emacs/early-init.el" = {
|
||||||
|
source = ./early-init.el;
|
||||||
|
target = ".emacs.d/early-init.el";
|
||||||
|
};
|
||||||
|
"emacs/init.el" = {
|
||||||
|
source = ./init.el;
|
||||||
|
target = ".emacs.d/init.el";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Services (if needed in Home Manager context)
|
||||||
|
services.nextcloud-client.enable = true;
|
||||||
}
|
}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
|||||||
@@ -1,67 +1,87 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
programs.emacs = {
|
programs.emacs = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# install with tree sitter enabled
|
package = pkgs.emacs-pgtk.override { withTreeSitter = true; };
|
||||||
package = (pkgs.emacs-pgtk.override { withTreeSitter = true; });
|
|
||||||
extraPackages = epkgs: [
|
# Group related packages for clarity and easier maintenance
|
||||||
# also install all tree sitter grammars
|
extraPackages = epkgs: with epkgs; [
|
||||||
epkgs.manualPackages.treesit-grammars.with-all-grammars
|
# Tree-sitter and language support
|
||||||
epkgs.nerd-icons # nerd fonts support
|
manualPackages.treesit-grammars.with-all-grammars
|
||||||
epkgs.doom-modeline # model line
|
rust-mode
|
||||||
epkgs.diminish # hides modes from modeline
|
rustic
|
||||||
epkgs.eldoc # doc support
|
nix-mode
|
||||||
epkgs.pulsar # pulses the cursor when jumping about
|
hcl-mode
|
||||||
epkgs.which-key # help porcelain
|
|
||||||
epkgs.expreg # expand region
|
# UI/UX and navigation
|
||||||
epkgs.vundo # undo tree
|
nerd-icons
|
||||||
epkgs.puni # structured editing
|
doom-modeline
|
||||||
epkgs.avy # jumping utility
|
diminish
|
||||||
epkgs.consult # emacs right click
|
eldoc
|
||||||
epkgs.vertico # minibuffer completion
|
eldoc-box
|
||||||
epkgs.marginalia # annotations for completions
|
pulsar
|
||||||
epkgs.crux # utilities
|
which-key
|
||||||
epkgs.magit # git porcelain
|
avy
|
||||||
epkgs.nerd-icons-corfu # nerd icons for completion
|
consult
|
||||||
epkgs.corfu # completion
|
vertico
|
||||||
epkgs.cape # completion extensions
|
marginalia
|
||||||
epkgs.orderless # search paradigm
|
crux
|
||||||
epkgs.yasnippet # snippets support
|
shell-pop
|
||||||
epkgs.yasnippet-snippets # commonly used snippets
|
|
||||||
epkgs.rg # ripgrep
|
# Completion and snippets
|
||||||
epkgs.exec-path-from-shell # load env and path
|
nerd-icons-corfu
|
||||||
epkgs.eat # better shell
|
corfu
|
||||||
epkgs.rust-mode # rust mode (when rust-ts doesn't cut it)
|
cape
|
||||||
epkgs.rustic # more rust things
|
orderless
|
||||||
epkgs.nix-mode # nix lang
|
yasnippet
|
||||||
epkgs.hcl-mode # hashicorp file mode
|
yasnippet-snippets
|
||||||
epkgs.shell-pop # quick shell popup
|
|
||||||
epkgs.envrc # support for loading .envrc
|
# Utilities and tools
|
||||||
epkgs.nixpkgs-fmt # format nix files
|
rg
|
||||||
epkgs.f # string + file utilities
|
exec-path-from-shell
|
||||||
epkgs.gptel # llm chat (mainly claude)
|
eat
|
||||||
epkgs.catppuccin-theme # catppuccin theme
|
f
|
||||||
epkgs.eldoc-box # docs in a box
|
gptel
|
||||||
epkgs.sideline # mainly for flymake errors on the side
|
nixpkgs-fmt
|
||||||
epkgs.sideline-flymake # mainly for flymake errors on the side
|
envrc
|
||||||
epkgs.sideline-eglot # mainly for flymake errors on the side
|
|
||||||
];
|
# Theming
|
||||||
};
|
catppuccin-theme
|
||||||
home.sessionVariables = {
|
|
||||||
EDITOR = "emacs";
|
# Git
|
||||||
XDG_SCREENSHOTS_DIR = "~/screenshots";
|
magit
|
||||||
};
|
|
||||||
home.file = {
|
# Editing and workflow
|
||||||
emacs-init = {
|
expreg
|
||||||
source = ./early-init.el;
|
vundo
|
||||||
target = ".emacs.d/early-init.el";
|
puni
|
||||||
};
|
|
||||||
emacs = {
|
# Error and side panel support
|
||||||
source = ./init.el;
|
sideline
|
||||||
target = ".emacs.d/init.el";
|
sideline-flymake
|
||||||
};
|
sideline-eglot
|
||||||
};
|
];
|
||||||
services.nextcloud-client = {
|
};
|
||||||
enable = true;
|
|
||||||
};
|
# Home Manager session variables
|
||||||
|
home.sessionVariables = {
|
||||||
|
EDITOR = "emacs";
|
||||||
|
XDG_SCREENSHOTS_DIR = "${pkgs.lib.getHome}/screenshots";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Home Manager file management
|
||||||
|
home.file = {
|
||||||
|
"emacs/early-init.el" = {
|
||||||
|
source = ./early-init.el;
|
||||||
|
target = ".emacs.d/early-init.el";
|
||||||
|
};
|
||||||
|
"emacs/init.el" = {
|
||||||
|
source = ./init.el;
|
||||||
|
target = ".emacs.d/init.el";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Services (if needed in Home Manager context)
|
||||||
|
services.nextcloud-client.enable = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user