Samuel Shuert | 02ffd1e | 2024-02-13 21:37:15 -0500 | [diff] [blame] | 1 | { config, lib, ... }: |
| 2 | { |
| 3 | options.chimera.editor.emacs = { |
| 4 | enable = lib.mkEnableOption "Enable emacs editor"; |
| 5 | defaultEditor = lib.mkOption { |
| 6 | type = lib.types.bool; |
| 7 | description = "Use emacs as the default editor"; |
| 8 | default = true; |
| 9 | }; |
| 10 | }; |
| 11 | |
| 12 | config = lib.mkIf config.chimera.editor.emacs.enable { |
| 13 | programs.emacs.enable = true; |
| 14 | services.emacs = { |
| 15 | enable = true; |
| 16 | defaultEditor = config.chimera.editor.emacs.defaultEditor; |
| 17 | }; |
| 18 | }; |
| 19 | } |