diff options
author | Simon Parri <simonparri@ganzeria.com> | 2025-05-17 12:40:06 -0500 |
---|---|---|
committer | Simon Parri <simonparri@ganzeria.com> | 2025-05-17 12:40:06 -0500 |
commit | 97e80a86dc3734e18dc23a23bdbd866ffa7d07b4 (patch) | |
tree | 1903d5f444b157ae95e1bf71189fa94a58c32d1f /modules/overlays/emacs.nix | |
parent | 4d223df38fad817dfde29e292de5d88658137675 (diff) | |
download | nixos-config-97e80a86dc3734e18dc23a23bdbd866ffa7d07b4.tar.gz nixos-config-97e80a86dc3734e18dc23a23bdbd866ffa7d07b4.zip |
modules/overlays: Make overlay .nix files be plain overlay functions
Also restructure modules/overlays/default.nix to account for this; move all
overlay options into default.nix and load the overlay functions conditionally
from there.
Diffstat (limited to 'modules/overlays/emacs.nix')
-rw-r--r-- | modules/overlays/emacs.nix | 36 |
1 files changed, 12 insertions, 24 deletions
diff --git a/modules/overlays/emacs.nix b/modules/overlays/emacs.nix index 7ed9658..05bb663 100644 --- a/modules/overlays/emacs.nix +++ b/modules/overlays/emacs.nix @@ -1,25 +1,13 @@ -{ lib, config, ... }: - -{ - options = { - this.overlays.emacs.enable = lib.mkEnableOption "custom-built Emacs overlay"; - }; - - config = lib.mkIf config.this.overlays.emacs.enable { - nixpkgs.overlays = [ - (final: prev: { - emacs = (prev.emacs.override { - withNativeCompilation = false; - withXwidgets = false; - withX = true; - withGTK3 = false; - withAthena = false; - }).overrideAttrs (attrs: with builtins; with attrs; { - configureFlags = filter (f: !elem f - ["--with-x-toolkit=lucid" "--with-toolkit-scroll-bars"]) - configureFlags ++ ["--with-x-toolkit=no" "--without-toolkit-scroll-bars"]; - }); - }) - ]; - }; +final: prev: { + emacs = (prev.emacs.override { + withNativeCompilation = false; + withXwidgets = false; + withX = true; + withGTK3 = false; + withAthena = false; + }).overrideAttrs (attrs: with builtins; with attrs; { + configureFlags = filter (f: !elem f + ["--with-x-toolkit=lucid" "--with-toolkit-scroll-bars"]) + configureFlags ++ ["--with-x-toolkit=no" "--without-toolkit-scroll-bars"]; + }); } |