summaryrefslogtreecommitdiff
path: root/modules/emacs/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/emacs/default.nix')
-rw-r--r--modules/emacs/default.nix41
1 files changed, 5 insertions, 36 deletions
diff --git a/modules/emacs/default.nix b/modules/emacs/default.nix
index 91a6069..6143cde 100644
--- a/modules/emacs/default.nix
+++ b/modules/emacs/default.nix
@@ -1,43 +1,12 @@
-{ pkgs, inputs, lib, config, ...}:
-let
- outside-emacs = with pkgs; [
- git
- nil
- ripgrep
- emacs-lsp-booster
- delta
- ];
- emacs = pkgs.emacsWithPackagesFromUsePackage {
- package = pkgs.emacs-unstable.override {
- withGTK3 = true;
- withNativeCompilation = true;
- withAlsaLib = true;
- withSystemd = true;
- withToolkitScrollBars = true;
- withImageMagick = true;
- };
- override = epkgs: let
- callPackage = pkgs.lib.callPackageWith (pkgs // epkgs);
- in epkgs // {
- eglot-booster = callPackage ./eglot-booster.nix {};
- };
- config = ./README.org;
- alwaysTangle = true;
- defaultInitFile = true;
- extraEmacsPackages = epkgs: [
- (epkgs.treesit-grammars.with-grammars (g: with g; [
- tree-sitter-rust
- tree-sitter-python
- ]))
- ];
- };
-in with lib; {
+{ pkgs, inputs, config, lib, ...}: let
+ inherit (lib) mkEnableOption mkIf;
+in {
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
- ] ++ outside-emacs;
+ pkgs.callPackage ./package.nix {}
+ ];
fonts.packages = with pkgs; [
nerd-fonts.dejavu-sans-mono
];