Skip to content

Commit 4680462

Browse files
committed
tweak(emacs): use emacs from nixpkgs
So we don't have to rebuild a rolling version of Emacs which is incredibly unlikely to be cached due to the override.
1 parent bcc2f33 commit 4680462

File tree

4 files changed

+22
-1
lines changed

4 files changed

+22
-1
lines changed

modules/nixos/preferences/default.nix

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{ lib, ... }:
2+
let
3+
inherit (lib) mkOption;
4+
inherit (lib.types) bool;
5+
in
6+
{
7+
options.elementary.preferences = {
8+
allowLongCompilationTimes = mkOption {
9+
type = bool;
10+
default = false;
11+
};
12+
};
13+
}

modules/nixos/programs/emacs/default.nix

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ in
1111
config =
1212
let
1313
emacsPackage = pkgs.emacsWithPackagesFromUsePackage {
14-
package = pkgs.emacs-pgtk.override { withImageMagick = true; };
14+
package =
15+
if config.elementary.preferences.allowLongCompilationTimes
16+
then pkgs.emacs-unstable-pgtk.override { withImageMagick = true; }
17+
else pkgs.emacs29-pgtk;
1518
config = ./init.el;
1619
alwaysEnsure = true;
1720
override = pkgs.callPackage ./overlay.nix { };

modules/nixos/programs/emacs/init.el

+1
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@
9494
tab-mark)))
9595

9696
(use-package indent-bars
97+
:ensure nil
9798
:hook
9899
(prog-mode . indent-bars-mode)
99100
(conf-mode . indent-bars-mode)

systems/x86_64-linux/carbon/default.nix

+4
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ with lib.elementary;
1212
];
1313

1414
elementary = {
15+
preferences = {
16+
allowLongCompilationTimes = true;
17+
};
18+
1519
virtualisation.docker = enabled;
1620
hardware.nvidia = enabled;
1721
roles.workstation = enabled;

0 commit comments

Comments
 (0)