diff --git a/Droidnix/README.org b/Droidnix/README.org index 679c674b9..c161ecf1a 100644 --- a/Droidnix/README.org +++ b/Droidnix/README.org @@ -1261,100 +1261,91 @@ This sets up the zsh terminal ** =generated/modules/apps/emacs/emacs.nix= This sets up the emacs terminal #+BEGIN_SRC nix :tangle generated/modules/apps/emacs/emacs.nix :noweb tangle :mkdirp yes :eval never-html -{ pkgs, ... }: +{ lib, ... }: + +flake.nixosModules.emacs = { config, pkgs, lib, ... }: { - # NixOS Configuration - environment.systemPackages = with pkgs; [ - # Add system-wide packages here, if any - ]; + # Optie om de module aan/uit te zetten + options.mySystem.system.emacs.enable = lib.mkEnableOption "Enable Emacs config"; - # Home Manager Configuration for the user 'henrov' - home-manager.users.henrov = { - programs.emacs = { - enable = true; - package = pkgs.emacs-pgtk.override { withTreeSitter = true; }; + config = lib.mkIf (config.mySystem.system.emacs.enable or false) { + # System packages (optioneel) + environment.systemPackages = with pkgs; [ + # Voeg systeem-brede packages toe als je wilt + ]; - # Group related packages for clarity and easier maintenance - extraPackages = epkgs: with epkgs; [ - # Tree-sitter and language support - manualPackages.treesit-grammars.with-all-grammars - rust-mode - rustic - nix-mode - hcl-mode + # Home Manager configuratie + home-manager.users.henrov = { + programs.emacs = { + enable = true; + package = pkgs.emacs-pgtk.override { withTreeSitter = true; }; - # UI/UX and navigation - nerd-icons - doom-modeline - diminish - eldoc - eldoc-box - pulsar - which-key - avy - consult - vertico - marginalia - crux - shell-pop + extraPackages = epkgs: with epkgs; [ + # Tree-sitter and language support + manualPackages.treesit-grammars.with-all-grammars + rust-mode + rustic + nix-mode + hcl-mode - # Completion and snippets - nerd-icons-corfu - corfu - cape - orderless - yasnippet - yasnippet-snippets + # UI/UX and navigation + nerd-icons + doom-modeline + diminish + eldoc + eldoc-box + pulsar + which-key + avy + consult + vertico + marginalia + crux + shell-pop - # Utilities and tools - rg - exec-path-from-shell - eat - f - gptel - nixpkgs-fmt - envrc + # Completion and snippets + nerd-icons-corfu + corfu + cape + orderless + yasnippet + yasnippet-snippets - # Theming - catppuccin-theme + # Utilities and tools + rg + exec-path-from-shell + eat + f + gptel + nixpkgs-fmt + envrc - # Git - magit + # Theming + catppuccin-theme - # Editing and workflow - expreg - vundo - puni + # Git + magit - # Error and side panel support - sideline - sideline-flymake - sideline-eglot - ]; - }; + # Editing and workflow + expreg + vundo + puni - # Home Manager session variables - home.sessionVariables = { - EDITOR = "emacs"; - XDG_SCREENSHOTS_DIR = "~/screenshots"; - }; - /* - # Home Manager file management - home.file = { - "emacs/early-init.el" = { - source = ./early-init.el; - target = ".emacs.d/early-init.el"; + # Error and side panel support + sideline + sideline-flymake + sideline-eglot + ]; }; - "emacs/init.el" = { - source = ./init.el; - target = ".emacs.d/init.el"; + + home.sessionVariables = { + EDITOR = "emacs"; + XDG_SCREENSHOTS_DIR = "~/screenshots"; }; }; - */ }; } - #+END_SRC ** =generated/modules/apps/emacs/early-init.el= diff --git a/Droidnix/generated/modules/apps/emacs/emacs.nix b/Droidnix/generated/modules/apps/emacs/emacs.nix index d610e9a2b..79873878f 100644 --- a/Droidnix/generated/modules/apps/emacs/emacs.nix +++ b/Droidnix/generated/modules/apps/emacs/emacs.nix @@ -1,93 +1,85 @@ -{ pkgs, ... }: +{ lib, ... }: + +flake.nixosModules.emacs = { config, pkgs, lib, ... }: { - # NixOS Configuration - environment.systemPackages = with pkgs; [ - # Add system-wide packages here, if any - ]; + # Optie om de module aan/uit te zetten + options.mySystem.system.emacs.enable = lib.mkEnableOption "Enable Emacs config"; - # Home Manager Configuration for the user 'henrov' - home-manager.users.henrov = { - programs.emacs = { - enable = true; - package = pkgs.emacs-pgtk.override { withTreeSitter = true; }; + config = lib.mkIf (config.mySystem.system.emacs.enable or false) { + # System packages (optioneel) + environment.systemPackages = with pkgs; [ + # Voeg systeem-brede packages toe als je wilt + ]; - # Group related packages for clarity and easier maintenance - extraPackages = epkgs: with epkgs; [ - # Tree-sitter and language support - manualPackages.treesit-grammars.with-all-grammars - rust-mode - rustic - nix-mode - hcl-mode + # Home Manager configuratie + home-manager.users.henrov = { + programs.emacs = { + enable = true; + package = pkgs.emacs-pgtk.override { withTreeSitter = true; }; - # UI/UX and navigation - nerd-icons - doom-modeline - diminish - eldoc - eldoc-box - pulsar - which-key - avy - consult - vertico - marginalia - crux - shell-pop + extraPackages = epkgs: with epkgs; [ + # Tree-sitter and language support + manualPackages.treesit-grammars.with-all-grammars + rust-mode + rustic + nix-mode + hcl-mode - # Completion and snippets - nerd-icons-corfu - corfu - cape - orderless - yasnippet - yasnippet-snippets + # UI/UX and navigation + nerd-icons + doom-modeline + diminish + eldoc + eldoc-box + pulsar + which-key + avy + consult + vertico + marginalia + crux + shell-pop - # Utilities and tools - rg - exec-path-from-shell - eat - f - gptel - nixpkgs-fmt - envrc + # Completion and snippets + nerd-icons-corfu + corfu + cape + orderless + yasnippet + yasnippet-snippets - # Theming - catppuccin-theme + # Utilities and tools + rg + exec-path-from-shell + eat + f + gptel + nixpkgs-fmt + envrc - # Git - magit + # Theming + catppuccin-theme - # Editing and workflow - expreg - vundo - puni + # Git + magit - # Error and side panel support - sideline - sideline-flymake - sideline-eglot - ]; - }; + # Editing and workflow + expreg + vundo + puni - # Home Manager session variables - home.sessionVariables = { - EDITOR = "emacs"; - XDG_SCREENSHOTS_DIR = "~/screenshots"; - }; - /* - # Home Manager file management - home.file = { - "emacs/early-init.el" = { - source = ./early-init.el; - target = ".emacs.d/early-init.el"; + # Error and side panel support + sideline + sideline-flymake + sideline-eglot + ]; }; - "emacs/init.el" = { - source = ./init.el; - target = ".emacs.d/init.el"; + + home.sessionVariables = { + EDITOR = "emacs"; + XDG_SCREENSHOTS_DIR = "~/screenshots"; }; }; - */ }; }