Working on reshuffling
This commit is contained in:
+72
-75
@@ -1418,87 +1418,84 @@ This sets up the emacs terminal
|
|||||||
#+BEGIN_SRC nix :tangle generated/modules/apps/emacs/emacs.nix :noweb tangle :mkdirp yes :eval never-html
|
#+BEGIN_SRC nix :tangle generated/modules/apps/emacs/emacs.nix :noweb tangle :mkdirp yes :eval never-html
|
||||||
{ lib, ... }:
|
{ lib, ... }:
|
||||||
|
|
||||||
let
|
|
||||||
enableEmacs = true; # Toggle to enable/disable Emacs module
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
# Top-level option to enable Emacs
|
flake.nixosModules.emacs = { config, pkgs, lib, ... }:
|
||||||
options.enableEmacs = lib.mkEnableOption "Enable Emacs configuration";
|
|
||||||
|
|
||||||
# Module configuration wrapped safely with mkIf
|
{
|
||||||
config = lib.mkIf enableEmacs {
|
# Optie om de module aan/uit te zetten
|
||||||
myApps = {
|
options.mySystem.system.emacs.enable = lib.mkEnableOption "Enable Emacs config";
|
||||||
emacs = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
# Home Manager user (top-level default can be used)
|
config = lib.mkIf (config.mySystem.system.emacs.enable or false) {
|
||||||
user = config.defaultUser or "henrov";
|
# System packages (optioneel)
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
# Voeg systeem-brede packages toe als je wilt
|
||||||
|
];
|
||||||
|
|
||||||
# Emacs package specification and extra packages
|
# Home Manager configuratie
|
||||||
package = {
|
home-manager.users.henrov = {
|
||||||
name = "emacs-pgtk";
|
programs.emacs = {
|
||||||
withTreeSitter = true;
|
enable = true;
|
||||||
|
package = pkgs.emacs-pgtk.override { withTreeSitter = true; };
|
||||||
|
|
||||||
|
extraPackages = epkgs: with epkgs; [
|
||||||
|
# Tree-sitter and language support
|
||||||
|
manualPackages.treesit-grammars.with-all-grammars
|
||||||
|
rust-mode
|
||||||
|
rustic
|
||||||
|
nix-mode
|
||||||
|
hcl-mode
|
||||||
|
|
||||||
|
# UI/UX and navigation
|
||||||
|
nerd-icons
|
||||||
|
doom-modeline
|
||||||
|
diminish
|
||||||
|
eldoc
|
||||||
|
eldoc-box
|
||||||
|
pulsar
|
||||||
|
which-key
|
||||||
|
avy
|
||||||
|
consult
|
||||||
|
vertico
|
||||||
|
marginalia
|
||||||
|
crux
|
||||||
|
shell-pop
|
||||||
|
|
||||||
|
# Completion and snippets
|
||||||
|
nerd-icons-corfu
|
||||||
|
corfu
|
||||||
|
cape
|
||||||
|
orderless
|
||||||
|
yasnippet
|
||||||
|
yasnippet-snippets
|
||||||
|
|
||||||
|
# Utilities and tools
|
||||||
|
rg
|
||||||
|
exec-path-from-shell
|
||||||
|
eat
|
||||||
|
f
|
||||||
|
gptel
|
||||||
|
nixpkgs-fmt
|
||||||
|
envrc
|
||||||
|
|
||||||
|
# Theming
|
||||||
|
catppuccin-theme
|
||||||
|
|
||||||
|
# Git
|
||||||
|
magit
|
||||||
|
|
||||||
|
# Editing and workflow
|
||||||
|
expreg
|
||||||
|
vundo
|
||||||
|
puni
|
||||||
|
|
||||||
|
# Error and side panel support
|
||||||
|
sideline
|
||||||
|
sideline-flymake
|
||||||
|
sideline-eglot
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
extraPackages = [
|
home.sessionVariables = {
|
||||||
# Tree-sitter and language support
|
|
||||||
"manualPackages.treesit-grammars.with-all-grammars"
|
|
||||||
"rust-mode"
|
|
||||||
"rustic"
|
|
||||||
"nix-mode"
|
|
||||||
"hcl-mode"
|
|
||||||
|
|
||||||
# UI/UX and navigation
|
|
||||||
"nerd-icons"
|
|
||||||
"doom-modeline"
|
|
||||||
"diminish"
|
|
||||||
"eldoc"
|
|
||||||
"eldoc-box"
|
|
||||||
"pulsar"
|
|
||||||
"which-key"
|
|
||||||
"avy"
|
|
||||||
"consult"
|
|
||||||
"vertico"
|
|
||||||
"marginalia"
|
|
||||||
"crux"
|
|
||||||
"shell-pop"
|
|
||||||
|
|
||||||
# Completion and snippets
|
|
||||||
"nerd-icons-corfu"
|
|
||||||
"corfu"
|
|
||||||
"cape"
|
|
||||||
"orderless"
|
|
||||||
"yasnippet"
|
|
||||||
"yasnippet-snippets"
|
|
||||||
|
|
||||||
# Utilities and tools
|
|
||||||
"rg"
|
|
||||||
"exec-path-from-shell"
|
|
||||||
"eat"
|
|
||||||
"f"
|
|
||||||
"gptel"
|
|
||||||
"nixpkgs-fmt"
|
|
||||||
"envrc"
|
|
||||||
|
|
||||||
# Theming
|
|
||||||
"catppuccin-theme"
|
|
||||||
|
|
||||||
# Git
|
|
||||||
"magit"
|
|
||||||
|
|
||||||
# Editing and workflow
|
|
||||||
"expreg"
|
|
||||||
"vundo"
|
|
||||||
"puni"
|
|
||||||
|
|
||||||
# Error and side panel support
|
|
||||||
"sideline"
|
|
||||||
"sideline-flymake"
|
|
||||||
"sideline-eglot"
|
|
||||||
];
|
|
||||||
|
|
||||||
# Optional environment/session variables
|
|
||||||
sessionVariables = {
|
|
||||||
EDITOR = "emacs";
|
EDITOR = "emacs";
|
||||||
XDG_SCREENSHOTS_DIR = "~/screenshots";
|
XDG_SCREENSHOTS_DIR = "~/screenshots";
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,86 +1,83 @@
|
|||||||
{ lib, ... }:
|
{ lib, ... }:
|
||||||
|
|
||||||
let
|
|
||||||
enableEmacs = true; # Toggle to enable/disable Emacs module
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
# Top-level option to enable Emacs
|
flake.nixosModules.emacs = { config, pkgs, lib, ... }:
|
||||||
options.enableEmacs = lib.mkEnableOption "Enable Emacs configuration";
|
|
||||||
|
|
||||||
# Module configuration wrapped safely with mkIf
|
{
|
||||||
config = lib.mkIf enableEmacs {
|
# Optie om de module aan/uit te zetten
|
||||||
myApps = {
|
options.mySystem.system.emacs.enable = lib.mkEnableOption "Enable Emacs config";
|
||||||
emacs = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
# Home Manager user (top-level default can be used)
|
config = lib.mkIf (config.mySystem.system.emacs.enable or false) {
|
||||||
user = config.defaultUser or "henrov";
|
# System packages (optioneel)
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
# Voeg systeem-brede packages toe als je wilt
|
||||||
|
];
|
||||||
|
|
||||||
# Emacs package specification and extra packages
|
# Home Manager configuratie
|
||||||
package = {
|
home-manager.users.henrov = {
|
||||||
name = "emacs-pgtk";
|
programs.emacs = {
|
||||||
withTreeSitter = true;
|
enable = true;
|
||||||
|
package = pkgs.emacs-pgtk.override { withTreeSitter = true; };
|
||||||
|
|
||||||
|
extraPackages = epkgs: with epkgs; [
|
||||||
|
# Tree-sitter and language support
|
||||||
|
manualPackages.treesit-grammars.with-all-grammars
|
||||||
|
rust-mode
|
||||||
|
rustic
|
||||||
|
nix-mode
|
||||||
|
hcl-mode
|
||||||
|
|
||||||
|
# UI/UX and navigation
|
||||||
|
nerd-icons
|
||||||
|
doom-modeline
|
||||||
|
diminish
|
||||||
|
eldoc
|
||||||
|
eldoc-box
|
||||||
|
pulsar
|
||||||
|
which-key
|
||||||
|
avy
|
||||||
|
consult
|
||||||
|
vertico
|
||||||
|
marginalia
|
||||||
|
crux
|
||||||
|
shell-pop
|
||||||
|
|
||||||
|
# Completion and snippets
|
||||||
|
nerd-icons-corfu
|
||||||
|
corfu
|
||||||
|
cape
|
||||||
|
orderless
|
||||||
|
yasnippet
|
||||||
|
yasnippet-snippets
|
||||||
|
|
||||||
|
# Utilities and tools
|
||||||
|
rg
|
||||||
|
exec-path-from-shell
|
||||||
|
eat
|
||||||
|
f
|
||||||
|
gptel
|
||||||
|
nixpkgs-fmt
|
||||||
|
envrc
|
||||||
|
|
||||||
|
# Theming
|
||||||
|
catppuccin-theme
|
||||||
|
|
||||||
|
# Git
|
||||||
|
magit
|
||||||
|
|
||||||
|
# Editing and workflow
|
||||||
|
expreg
|
||||||
|
vundo
|
||||||
|
puni
|
||||||
|
|
||||||
|
# Error and side panel support
|
||||||
|
sideline
|
||||||
|
sideline-flymake
|
||||||
|
sideline-eglot
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
extraPackages = [
|
home.sessionVariables = {
|
||||||
# Tree-sitter and language support
|
|
||||||
"manualPackages.treesit-grammars.with-all-grammars"
|
|
||||||
"rust-mode"
|
|
||||||
"rustic"
|
|
||||||
"nix-mode"
|
|
||||||
"hcl-mode"
|
|
||||||
|
|
||||||
# UI/UX and navigation
|
|
||||||
"nerd-icons"
|
|
||||||
"doom-modeline"
|
|
||||||
"diminish"
|
|
||||||
"eldoc"
|
|
||||||
"eldoc-box"
|
|
||||||
"pulsar"
|
|
||||||
"which-key"
|
|
||||||
"avy"
|
|
||||||
"consult"
|
|
||||||
"vertico"
|
|
||||||
"marginalia"
|
|
||||||
"crux"
|
|
||||||
"shell-pop"
|
|
||||||
|
|
||||||
# Completion and snippets
|
|
||||||
"nerd-icons-corfu"
|
|
||||||
"corfu"
|
|
||||||
"cape"
|
|
||||||
"orderless"
|
|
||||||
"yasnippet"
|
|
||||||
"yasnippet-snippets"
|
|
||||||
|
|
||||||
# Utilities and tools
|
|
||||||
"rg"
|
|
||||||
"exec-path-from-shell"
|
|
||||||
"eat"
|
|
||||||
"f"
|
|
||||||
"gptel"
|
|
||||||
"nixpkgs-fmt"
|
|
||||||
"envrc"
|
|
||||||
|
|
||||||
# Theming
|
|
||||||
"catppuccin-theme"
|
|
||||||
|
|
||||||
# Git
|
|
||||||
"magit"
|
|
||||||
|
|
||||||
# Editing and workflow
|
|
||||||
"expreg"
|
|
||||||
"vundo"
|
|
||||||
"puni"
|
|
||||||
|
|
||||||
# Error and side panel support
|
|
||||||
"sideline"
|
|
||||||
"sideline-flymake"
|
|
||||||
"sideline-eglot"
|
|
||||||
];
|
|
||||||
|
|
||||||
# Optional environment/session variables
|
|
||||||
sessionVariables = {
|
|
||||||
EDITOR = "emacs";
|
EDITOR = "emacs";
|
||||||
XDG_SCREENSHOTS_DIR = "~/screenshots";
|
XDG_SCREENSHOTS_DIR = "~/screenshots";
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user