Skip to content

Commit

Permalink
feat(emacs): add package option
Browse files Browse the repository at this point in the history
  • Loading branch information
gekoke committed Sep 3, 2024
1 parent 847ee54 commit 52b3bb1
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions modules/nixos/programs/emacs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,24 @@ in
{
options.elementary.programs.emacs = {
enable = mkEnableOption "GNU Emacs";
package = mkOption {
type = types.package;
default =
if config.elementary.preferences.allowLongCompilationTimes then
# FIXME: make this `emacs-unstable-pgtk` once that points to Emacs 30
# (you can check here: https://github.com/nix-community/emacs-overlay/blob/master/repos/emacs/emacs-unstable.json)
# currently only using `emacs-pgtk` (which points to Git master branch)
# for Emacs 30 stipple support for `indent-bars`
pkgs.emacs-pgtk
else
pkgs.emacs29-pgtk;
};
};

config =
let
emacsPackage = pkgs.emacsWithPackagesFromUsePackage {
package =
if config.elementary.preferences.allowLongCompilationTimes then
# FIXME: make this `emacs-unstable-pgtk` once that points to Emacs 30
# (you can check here: https://github.com/nix-community/emacs-overlay/blob/master/repos/emacs/emacs-unstable.json)
# currently only using `emacs-pgtk` (which points to Git master branch)
# for Emacs 30 stipple support for `indent-bars`
pkgs.emacs-pgtk
else
pkgs.emacs29-pgtk;
inherit (cfg) package;
config = ./init.el;
alwaysEnsure = true;
override = pkgs.callPackage ./overlay.nix { };
Expand Down

0 comments on commit 52b3bb1

Please sign in to comment.