Samuel Shuert | 02ffd1e | 2024-02-13 21:37:15 -0500 | [diff] [blame] | 1 | { |
| 2 | config, |
| 3 | lib, |
| 4 | pkgs, |
| 5 | ... |
| 6 | }: |
| 7 | { |
| 8 | options.chimera.editor.ed = { |
| 9 | enable = lib.mkEnableOption "Enable the standard text editor, the greatest WYGIWYG editor of all, the only viable text editor, Ed"; |
| 10 | defaultEditor = lib.mkOption { |
| 11 | type = lib.types.bool; |
| 12 | description = "Use Ed as the default editor"; |
| 13 | default = true; |
| 14 | }; |
| 15 | }; |
| 16 | |
| 17 | config = lib.mkIf config.chimera.editor.ed.enable { |
| 18 | home.packages = [ pkgs.ed ]; |
| 19 | |
| 20 | home.sessionVariables = lib.mkIf config.chimera.editor.ed.defaultEditor { |
| 21 | EDITOR = "${pkgs.ed}/bin/ed"; |
| 22 | }; |
| 23 | }; |
| 24 | } |