blob: 9a43c2e4b2fce535931f65fd209e4acb21ef8d4e [file] [log] [blame]
PineaFanb5c08d82024-04-20 20:49:52 +01001{ 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}