materusPC: plasma-manager and emacs updates
This commit is contained in:
parent
a69b24ac89
commit
1154c45291
|
@ -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")}
|
||||
'';
|
||||
|
||||
}
|
||||
|
|
|
@ -26,3 +26,10 @@
|
|||
)
|
||||
)
|
||||
)
|
||||
|
||||
(when (and (fboundp 'startup-redirect-eln-cache)
|
||||
(fboundp 'native-comp-available-p)
|
||||
(native-comp-available-p))
|
||||
(startup-redirect-eln-cache
|
||||
(convert-standard-filename
|
||||
(expand-file-name "var/eln-cache/" user-emacs-directory))))
|
||||
|
|
|
@ -26,16 +26,30 @@
|
|||
)
|
||||
)
|
||||
)
|
||||
(setq auto-save-list-file-prefix (concat user-emacs-directory "backups/"))
|
||||
(setq backup-directory-alist
|
||||
`(("." . ,(concat user-emacs-directory "backups/"))))
|
||||
|
||||
|
||||
|
||||
(setq custom-file (concat user-emacs-directory "etc/custom.el"))
|
||||
|
||||
(setq auto-save-default nil)
|
||||
(setq backup-directory-alist
|
||||
`((".*" . ,(concat user-emacs-directory "var/backups/"))))
|
||||
(setq auto-save-file-name-transforms
|
||||
`((".*" ,(concat user-emacs-directory "var/recovery/") t)))
|
||||
|
||||
|
||||
; Load packages
|
||||
(require 'telephone-line)
|
||||
(require 'elcord)
|
||||
(require 'dashboard)
|
||||
(require 'minions)
|
||||
(require 'doom-themes)
|
||||
|
||||
(require 'nerd-icons)
|
||||
(require 'centaur-tabs)
|
||||
(require 'projectile)
|
||||
(require 'treemacs)
|
||||
(require 'treemacs-projectile)
|
||||
(require 'treemacs-nerd-icons)
|
||||
|
||||
;Graphical
|
||||
(setq frame-resize-pixelwise t)
|
||||
|
@ -46,7 +60,6 @@
|
|||
|
||||
|
||||
(setq read-process-output-max (* 1024 1024 3))
|
||||
(setq custom-file (concat user-emacs-directory "custom.el"))
|
||||
(when (or (not (display-graphic-p)) (daemonp))
|
||||
(xterm-mouse-mode 1)
|
||||
)
|
||||
|
@ -79,18 +92,29 @@
|
|||
|
||||
;Enable dashboard
|
||||
(setq dashboard-center-content t)
|
||||
(setq dashboard-display-icons-p t)
|
||||
(setq dashboard-icon-type 'nerd-icons)
|
||||
(dashboard-setup-startup-hook)
|
||||
(when (daemonp)
|
||||
(setq initial-buffer-choice (lambda () (get-buffer "*dashboard*"))) ; Show dashboard when emacs is running as daemon
|
||||
)
|
||||
|
||||
;Enable Centaur tabs
|
||||
(centaur-tabs-mode t)
|
||||
(setq centaur-tabs-set-bar 'over)
|
||||
(setq centaur-tabs-set-modified-marker t)
|
||||
;(setq centaur-tabs-modified-marker "*")
|
||||
|
||||
|
||||
;Enable treemacs
|
||||
(global-set-key (kbd "C-H-t") 'treemacs)
|
||||
|
||||
;CUA
|
||||
(cua-mode 1)
|
||||
(global-set-key (kbd "C-y") 'undo-redo)
|
||||
|
||||
;(define-key key-translation-map [8711] 'event-apply-hyper-modifier )
|
||||
|
||||
(define-key key-translation-map (kbd "<XF86Calculator>") 'event-apply-hyper-modifier )
|
||||
(define-key key-translation-map (kbd "<Calculator>") 'event-apply-hyper-modifier )
|
||||
|
||||
;(global-set-key (kbd "C-∇") (kbd "C-H"))
|
||||
;(global-set-key (kbd "H-∇") (lambda () (interactive) (insert-char #x2207)))
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
(defvar materus/nix-packages nil)
|
||||
|
||||
|
||||
|
||||
(when (not materus/nix-packages)
|
||||
(message "Not using config from nix packages, using straight")
|
||||
(defvar bootstrap-version)
|
||||
(let ((bootstrap-file
|
||||
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
|
||||
(bootstrap-version 6))
|
||||
(unless (file-exists-p bootstrap-file)
|
||||
(with-current-buffer
|
||||
(url-retrieve-synchronously
|
||||
"https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
|
||||
'silent 'inhibit-cookies)
|
||||
(goto-char (point-max))
|
||||
(eval-print-last-sexp)))
|
||||
(load bootstrap-file nil 'nomessage))
|
||||
(declare-function straight-use-package "straight" (&optional ARG))
|
||||
(straight-use-package 'load-relative)
|
||||
|
||||
(straight-use-package 'use-package)
|
||||
(straight-use-package 'telephone-line)
|
||||
(straight-use-package 'elcord)
|
||||
(straight-use-package 'dashboard)
|
||||
(straight-use-package 'minions)
|
||||
(straight-use-package 'lsp-mode)
|
||||
(straight-use-package 'lsp-ui)
|
||||
|
||||
(straight-use-package 'moe-theme)
|
||||
(straight-use-package 'doom-themes)
|
||||
)
|
||||
|
Loading…
Reference in New Issue