Working on Emacs

- now my custom Emacs package lives inside `pkgs/`
- small org-mode updates
- added custom Emacs commands to rebuild NixOS
This commit is contained in:
Andrea Ciceri 2021-10-06 10:50:19 +02:00
parent ce354185e8
commit 54a41ac797
No known key found for this signature in database
GPG key ID: A1FC89532D1C5654
6 changed files with 73 additions and 51 deletions

View file

@ -8,42 +8,6 @@
programs.emacs = {
enable = true;
package =
let
myEmacs = pkgs.emacsPgtkGcc;
emacsWithPackages = (pkgs.emacsPackagesFor myEmacs).emacsWithPackages;
in
emacsWithPackages (
epkgs: (
with epkgs.melpaStablePackages; [ ]
) ++ (
with epkgs.melpaPackages; [
all-the-icons
use-package
evil
evil-collection
helm
projectile
magit
fira-code-mode
format-all
nix-mode
lispy
lsp-mode
dap-mode
which-key
treemacs
treemacs-evil
treemacs-projectile
treemacs-icons-dired
treemacs-magit
treemacs-persp
]
) ++ (
with epkgs.elpaPackages; [
modus-themes
]
) ++ [ ]
);
package = pkgs.customEmacs;
};
}

View file

@ -1,5 +1,10 @@
(use-package org
:init (setq fill-column 80)
:hook (org-mode . refill-mode))
:init
(setq fill-column 80)
:hook
((org-mode . refill-mode)
(org-mode . (lambda () (org-superstar-mode 1)))
(org-mode . prettify-symbols-mode)))
(provide 'config-org)

View file

@ -1,4 +1,14 @@
(use-package nix-mode
:mode "\\.nix\\'")
(provide 'nix)
(require 'sudo-utils)
(defun nixos-rebuild-switch ()
(interactive)
(sudo-utils-shell-command "nixos-rebuild switch"))
(defun nixos-rebuild-test ()
(interactive)
(sudo-utils-shell-command "nixos-rebuild test"))
(provide 'nix)