about summary refs log blame commit diff
path: root/system/modules/emacs.nix
blob: 1cfa2b07452c1cd13b45ff705ef2c57e27339f3f (plain) (tree)






















                                                                                                           
{ config, pkgs, lib, ... }:
with lib;
{
  options.programs.emacs.useGit = mkOption {
    description = "Use emacs from git";
    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))
    ];

    environment.systemPackages = with pkgs; [
      (if config.programs.emacs.useGit then emacsGit else emacs)
      ripgrep
      coreutils
      fd
      clang
    ];
  };
}