mirror of
https://github.com/materusPL/nixos-config
synced 2026-07-02 12:46:42 +00:00
code: nixpkgs-fmt to format code
This commit is contained in:
@@ -1,74 +1,74 @@
|
||||
{ config, lib, pkgs, materusArg, ... }:
|
||||
let
|
||||
configPath = "${materusArg.cfg.path}" + "/extraFiles/config/emacs/";
|
||||
configPath = "${materusArg.cfg.path}" + "/extraFiles/config/emacs/";
|
||||
|
||||
inits = import ./init.nix {path = configPath; inherit pkgs;};
|
||||
packages = epkgs: with epkgs; [
|
||||
load-relative
|
||||
elcord
|
||||
persp-mode
|
||||
dashboard
|
||||
magit
|
||||
helm
|
||||
avy
|
||||
corfu
|
||||
vterm
|
||||
centaur-tabs
|
||||
projectile
|
||||
company
|
||||
clipetty
|
||||
inits = import ./init.nix { path = configPath; inherit pkgs; };
|
||||
packages = epkgs: with epkgs; [
|
||||
load-relative
|
||||
elcord
|
||||
persp-mode
|
||||
dashboard
|
||||
magit
|
||||
helm
|
||||
avy
|
||||
corfu
|
||||
vterm
|
||||
centaur-tabs
|
||||
projectile
|
||||
company
|
||||
clipetty
|
||||
|
||||
treemacs
|
||||
treemacs-nerd-icons
|
||||
treemacs-perspective
|
||||
treemacs-icons-dired
|
||||
treemacs-magit
|
||||
treemacs-projectile
|
||||
tree-edit
|
||||
vertico
|
||||
nerd-icons
|
||||
nerd-icons-completion
|
||||
perspective
|
||||
minions
|
||||
telephone-line
|
||||
rainbow-delimiters
|
||||
use-package
|
||||
treemacs
|
||||
treemacs-nerd-icons
|
||||
treemacs-perspective
|
||||
treemacs-icons-dired
|
||||
treemacs-magit
|
||||
treemacs-projectile
|
||||
tree-edit
|
||||
vertico
|
||||
nerd-icons
|
||||
nerd-icons-completion
|
||||
perspective
|
||||
minions
|
||||
telephone-line
|
||||
rainbow-delimiters
|
||||
use-package
|
||||
|
||||
cmake-mode
|
||||
lsp-mode
|
||||
lsp-java
|
||||
lsp-jedi
|
||||
lsp-haskell
|
||||
lsp-ui
|
||||
lsp-treemacs
|
||||
dap-mode
|
||||
d-mode
|
||||
multiple-cursors
|
||||
org
|
||||
org-rainbow-tags
|
||||
org-roam
|
||||
org-roam-ui
|
||||
org-review
|
||||
markdown-mode
|
||||
json-mode
|
||||
nix-mode
|
||||
|
||||
minimap
|
||||
cmake-mode
|
||||
lsp-mode
|
||||
lsp-java
|
||||
lsp-jedi
|
||||
lsp-haskell
|
||||
lsp-ui
|
||||
lsp-treemacs
|
||||
dap-mode
|
||||
d-mode
|
||||
multiple-cursors
|
||||
org
|
||||
org-rainbow-tags
|
||||
org-roam
|
||||
org-roam-ui
|
||||
org-review
|
||||
markdown-mode
|
||||
json-mode
|
||||
nix-mode
|
||||
|
||||
|
||||
moe-theme
|
||||
doom-themes
|
||||
];
|
||||
minimap
|
||||
|
||||
|
||||
moe-theme
|
||||
doom-themes
|
||||
];
|
||||
|
||||
|
||||
default-config = ''
|
||||
(defvar materus/nix-packages t)
|
||||
(defvar materus/init-from-home nil)
|
||||
(unless materus/init-from-home
|
||||
(message "Config loading not from homeDir, need \"materus/init-from-home\" variable in init.el")
|
||||
${setNixInit}
|
||||
${inits.initText}
|
||||
)
|
||||
(defvar materus/nix-packages t)
|
||||
(defvar materus/init-from-home nil)
|
||||
(unless materus/init-from-home
|
||||
(message "Config loading not from homeDir, need \"materus/init-from-home\" variable in init.el")
|
||||
${setNixInit}
|
||||
${inits.initText}
|
||||
)
|
||||
'';
|
||||
|
||||
emacsPkgs = with pkgs;[
|
||||
@@ -93,29 +93,29 @@ in
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.activation.emacsCompile = lib.hm.dag.entryAfter [ "linkGeneration" ] ''
|
||||
${config.programs.emacs.finalPackage}/bin/emacs --batch \
|
||||
--eval '(setq warning-minimum-log-level :error)' \
|
||||
--eval '(byte-compile-file "${config.xdg.configHome}/emacs/early-init.el")' \
|
||||
--eval '(byte-compile-file "${config.xdg.configHome}/emacs/init.el")'
|
||||
${config.programs.emacs.finalPackage}/bin/emacs --batch \
|
||||
--eval '(setq warning-minimum-log-level :error)' \
|
||||
--eval '(byte-compile-file "${config.xdg.configHome}/emacs/early-init.el")' \
|
||||
--eval '(byte-compile-file "${config.xdg.configHome}/emacs/init.el")'
|
||||
'';
|
||||
xdg.configFile."emacs/init.el".text = ''
|
||||
(defvar materus/nix-packages nil)
|
||||
(defvar materus/init-from-home t)
|
||||
(setq-default materus/init-from-home t)
|
||||
(defvar materus/nix-packages nil)
|
||||
(defvar materus/init-from-home t)
|
||||
(setq-default materus/init-from-home t)
|
||||
|
||||
${setNixInit}
|
||||
${inits.initText}
|
||||
${setNixInit}
|
||||
${inits.initText}
|
||||
'';
|
||||
|
||||
xdg.configFile."emacs/early-init.el".text = ''
|
||||
${inits.earlyInitText}
|
||||
${inits.earlyInitText}
|
||||
'';
|
||||
|
||||
programs.emacs = {
|
||||
enable = true;
|
||||
package = with pkgs; lib.mkDefault (emacs29.override { withX = true; withGTK3 = true; withAlsaLib = true; withGconf = true; withImageMagick = true; withXwidgets = true; });
|
||||
extraPackages = epkgs: ((packages epkgs));
|
||||
extraConfig = default-config;
|
||||
extraConfig = default-config;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{path, pkgs}:
|
||||
{ path, pkgs }:
|
||||
{
|
||||
|
||||
earlyInitText = ''
|
||||
${builtins.readFile (path + "early-init.el")}
|
||||
${builtins.readFile (path + "early-init.el")}
|
||||
'';
|
||||
initText = ''
|
||||
(defvar materus/init-from-home nil)
|
||||
@@ -13,5 +13,5 @@
|
||||
${builtins.readFile (path + "packages.el")}
|
||||
${builtins.readFile (path + "init.el")}
|
||||
'';
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user