emacs.nix (440B)
1 { config, lib, pkgs, ... }: 2 let 3 inherit (lib) mkEnableOption mkIf; 4 cfg = config.modules.editors.emacs; 5 in 6 { 7 options.modules.editors.emacs = { 8 enable = mkEnableOption "enable emacs editor"; 9 }; 10 config = mkIf cfg.enable { 11 # modules.editors.default = "emacs"; 12 # FIXME add a default configuration 13 environment = { 14 systemPackages = [ pkgs.emacs ]; 15 shellAliases = { 16 e = "emacs"; 17 }; 18 }; 19 }; 20 }