diff options
author | Leonardo Santiago <[email protected]> | 2024-09-12 21:44:46 -0300 |
---|---|---|
committer | Leonardo Santiago <[email protected]> | 2024-09-12 23:20:51 -0300 |
commit | 62100c9265a4de389d1ea8060cbddddacde161a7 (patch) | |
tree | 811ca1c5803ccdb2670f0c239214bc0dc30f57c7 /modules/emacs | |
parent | f9ddec7952709d7b5d5d79deadca07c573510d49 (diff) |
split users/leonardo.nix into modules with options
in order to be able to deploy just a few of those to iori.nix
Diffstat (limited to 'modules/emacs')
-rw-r--r-- | modules/emacs/README.org | 4 | ||||
-rw-r--r-- | modules/emacs/default.nix (renamed from modules/emacs/emacs.nix) | 10 |
2 files changed, 6 insertions, 8 deletions
diff --git a/modules/emacs/README.org b/modules/emacs/README.org index 0b8ff54..81c0775 100644 --- a/modules/emacs/README.org +++ b/modules/emacs/README.org @@ -388,12 +388,12 @@ Actual mu4e definition (use-package mu4e :bind ("C-c m" . mu4e) :custom - (mu4e-notification-support t) (read-mail-command 'mu4e) (mu4e-index-cleanup nil) (mu4e-index-lazy-check t) (mu4e-use-fancy-chars (display-graphic-p)) (mu4e-confirm-quit nil) + (mu4e-eldoc-support t) (mu4e-change-filenames-when-moving t) (mu4e-update-interval (* 5 60)) (mu4e-get-mail-command "parallel mbsync ::: personal work university") @@ -417,7 +417,7 @@ Actual mu4e definition (cond ((personal-p msg) "/personal/[Gmail]/Todos\ os\ e-mails") ((university-p msg) "/university/[Gmail]/Todos\ os\ e-mails") - ((work-p msg) "/work/[Gmail]/'All mail'")))) + ((work-p msg) "/work/[Gmail]/All\ mail")))) (mu4e-trash-folder (lambda (msg) (cond ((personal-p msg) "/personal/[Gmail]/Lixeira") diff --git a/modules/emacs/emacs.nix b/modules/emacs/default.nix index bc73977..ceba97e 100644 --- a/modules/emacs/emacs.nix +++ b/modules/emacs/default.nix @@ -1,13 +1,11 @@ -{ pkgs, inputs, ...}: +{ pkgs, inputs, lib, config, ...}: let outside-emacs = with pkgs; [ (python3.withPackages (p: (with p; [ python-lsp-server python-lsp-ruff - pylsp-mypy ]))) nil - parallel ripgrep emacs-lsp-booster ]; @@ -42,9 +40,9 @@ let ])) ] ++ outside-emacs; }; -in -{ - config = { +in with lib; { + options.santi-modules.emacs.enable = mkEnableOption "Enable emacs configuration"; + config = mkIf config.santi-modules.emacs.enable { nixpkgs.overlays = [ inputs.emacs-overlay.overlays.default ]; environment.systemPackages = [ emacs |