materusPC: plasma-manager and emacs updates

This commit is contained in:
2024-10-28 16:31:39 +01:00
parent a69b24ac89
commit 1154c45291
8 changed files with 131 additions and 141 deletions
@@ -17,7 +17,7 @@
enableTerminal = lib.mkDefault true;
enableTerminalExtra = lib.mkDefault true;
enableNixDevel = lib.mkDefault true;
editor.emacs.enable = false;
editor.emacs.enable = true;
editor.code.fhs.enable = true;
editor.code.fhs.packages = (ps: with ps; let llvmpkgs = llvmPackages_18; in [
llvmpkgs.clang
@@ -44,6 +44,7 @@
shortcuts = {
"kwin"."Grid View" = "Meta+Alt+Tab";
"kwin"."Overview" = "Meta+Tab";
"services/org.kde.kcalc.desktop"."_launch" = [ ];
};
spectacle.shortcuts = {
captureActiveWindow = "Meta+Print";
@@ -26,6 +26,7 @@
};
environment.systemPackages = with pkgs; [
kdePackages.ark
kdePackages.kcalc
];
programs.kdeconnect.enable = true;
materus.profile.steam.extraPkgs = [ pkgs.kdePackages.breeze pkgs.kdePackages.breeze-gtk pkgs.kdePackages.dolphin pkgs.vlc pkgs.vkbasalt-cli ];
@@ -2,127 +2,122 @@
let
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
moe-theme
doom-themes
];
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
no-littering
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}
)
${setNixInit}
${inits.initText}
'';
emacsPkgs = with pkgs;[
python3
lua
multimarkdown
git
];
emacsPkgs = with pkgs; [ python3 lua multimarkdown git ];
cfg = config.materus.profile.editor.emacs;
setNixInit = ''
(setenv "PATH" (concat (getenv "PATH") ":${lib.makeBinPath emacsPkgs}"))
${builtins.concatStringsSep "\n" (builtins.map (x: "(setq exec-path (append exec-path '(\""+x+"/bin\")))" ) emacsPkgs)}
(call-process-shell-command "${pkgs.xorg.xmodmap}/bin/xmodmap -e \"keycode 66 = Hyper_L\" -e \"remove Mod4 = Hyper_L\" -e \"add Mod3 = Hyper_L\" &" nil 0)
${builtins.concatStringsSep "\n" (builtins.map
(x: ''(setq exec-path (append exec-path '("'' + x + ''/bin")))'')
emacsPkgs)}
(call-process-shell-command "${pkgs.xorg.xmodmap}/bin/xmodmap -e \"keycode 148 = Hyper_L\" -e \"remove Mod4 = Hyper_L\" -e \"add Mod3 = Hyper_L\" &" nil 0)
'';
in
{
options.materus.profile.editor.emacs.enable = materusArg.pkgs.lib.mkBoolOpt false "Enable emacs with materus cfg";
in {
options.materus.profile.editor.emacs.enable =
materusArg.pkgs.lib.mkBoolOpt false "Enable emacs with materus cfg";
config = lib.mkIf cfg.enable {
home.activation.emacsCompile = lib.hm.dag.entryAfter [ "linkGeneration" ] ''
mkdir -p ${config.xdg.configHome}/emacs/var/backups
mkdir -p ${config.xdg.configHome}/emacs/var/recovery
mkdir -p ${config.xdg.configHome}/emacs/etc
run ${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)
${setNixInit}
${inits.initText}
'';
xdg.configFile."emacs/early-init.el".text = ''
${inits.earlyInitText}
'';
xdg.configFile."emacs/init.el".text =''
(require 'recentf)
(require 'no-littering)
(add-to-list 'recentf-exclude
(recentf-expand-file-name no-littering-var-directory))
(add-to-list 'recentf-exclude
(recentf-expand-file-name no-littering-etc-directory))
'';
programs.emacs = {
enable = true;
package = with pkgs; lib.mkDefault (pkgs.emacs29.override {
withSQLite3 = true;
withWebP = true;
withX = true;
withGTK3 = true;
withAlsaLib = true;
withGconf = true;
withImageMagick = true;
withXwidgets = true;
});
package = with pkgs;
lib.mkDefault (pkgs.emacs29.override {
withSQLite3 = true;
withWebP = true;
withX = true;
withGTK3 = true;
withAlsaLib = true;
withGconf = true;
withImageMagick = true;
withXwidgets = true;
});
extraPackages = epkgs: ((packages epkgs));
extraConfig = default-config;
};
@@ -5,13 +5,8 @@
${builtins.readFile (path + "early-init.el")}
'';
initText = ''
(defvar materus/init-from-home nil)
(when materus/init-from-home
(setq-default inhibit-defaul-init 1)
)
(setq-default materus/nix-packages (require 'doom-themes nil 'noerror))
${builtins.readFile (path + "packages.el")}
${builtins.readFile (path + "init.el")}
(require 'doom-themes nil 'noerror)
${builtins.readFile (path + "init.el")}
'';
}