PineaFan | b5c08d8 | 2024-04-20 20:49:52 +0100 | [diff] [blame] | 1 | { config, lib, pkgs, ... }: |
| 2 | { |
| 3 | options.chimera.editor.nano = { |
| 4 | enable = lib.mkEnableOption "Enable nano editor"; |
| 5 | defaultEditor = lib.mkOption { |
| 6 | type = lib.types.bool; |
| 7 | description = "Use nano as the default editor"; |
| 8 | default = true; |
| 9 | }; |
| 10 | }; |
| 11 | |
| 12 | config = lib.mkIf config.chimera.editor.nano.enable { |
| 13 | home.packages = [ pkgs.nano ]; |
| 14 | |
| 15 | home.sessionVariables = lib.mkIf config.chimera.editor.nano.defaultEditor { |
| 16 | EDITOR = "${pkgs.nano}/bin/nano"; |
| 17 | }; |
| 18 | }; |
| 19 | } |