about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGriffin Smith <root@gws.fyi>2020-05-10T22·41-0400
committerGriffin Smith <root@gws.fyi>2020-05-10T22·41-0400
commit1f0f282e76ab71ac9d46d3fb984832c9d5fdcbfd (patch)
treef7eaa64d8fc747991e401d7c02eaf55aecc6aca9
parent3ae2b02e8f12c516af1debf1e304f3d377142881 (diff)
use emacsUnstable (27)
-rw-r--r--system/modules/emacs.nix32
1 files changed, 25 insertions, 7 deletions
diff --git a/system/modules/emacs.nix b/system/modules/emacs.nix
index 1cfa2b07452c..480711b97853 100644
--- a/system/modules/emacs.nix
+++ b/system/modules/emacs.nix
@@ -1,23 +1,41 @@
 { config, pkgs, lib, ... }:
 with lib;
 {
-  options.programs.emacs.useGit = mkOption {
-    description = "Use emacs from git";
-    type = types.bool;
-    default = false;
+  options = {
+    programs.emacs.useGit = mkOption {
+      description = "Use emacs from git";
+      type = types.bool;
+      default = false;
+    };
+
+    programs.emacs.useUnstable = mkOption {
+      description = "Use emacs unstable";
+      type = types.bool;
+      default = false;
+    };
   };
 
   config = {
-    nixpkgs.overlays = if config.programs.emacs.useGit then [] else [
-      (import (builtins.fetchTarball https://github.com/nix-community/emacs-overlay/archive/master.tar.gz))
+    nixpkgs.overlays = [
+      (import (builtins.fetchTarball {
+        url = "https://github.com/nix-community/emacs-overlay/archive/54afb061bdd12c61bbfcc13bad98b7a3aab7d8d3.tar.gz";
+        sha256 = "0hrbg65d5h0cb0nky7a46md7vlvhajq1hf0328l2f7ln9hznqz6j";
+      }))
     ];
 
     environment.systemPackages = with pkgs; [
-      (if config.programs.emacs.useGit then emacsGit else emacs)
+      (if config.programs.emacs.useGit
+       then emacsGit
+       else
+         if config.programs.emacs.useUnstable
+         then emacsUnstable
+         else emacs)
       ripgrep
       coreutils
       fd
       clang
     ];
+
+    programs.emacs.useUnstable = true;
   };
 }