Add support for the Nano text editor
Change-Id: I12e33661049a021c5c4f110034405f28f7d93ae8
Reviewed-on: https://git.clicks.codes/c/Chimera/NixFiles/+/639
Tested-by: Samuel Shuert <coded@clicks.codes>
Reviewed-by: Samuel Shuert <coded@clicks.codes>
diff --git a/modules/home/editor/nano/default.nix b/modules/home/editor/nano/default.nix
new file mode 100644
index 0000000..9a43c2e
--- /dev/null
+++ b/modules/home/editor/nano/default.nix
@@ -0,0 +1,19 @@
+{ config, lib, pkgs, ... }:
+{
+ options.chimera.editor.nano = {
+ enable = lib.mkEnableOption "Enable nano editor";
+ defaultEditor = lib.mkOption {
+ type = lib.types.bool;
+ description = "Use nano as the default editor";
+ default = true;
+ };
+ };
+
+ config = lib.mkIf config.chimera.editor.nano.enable {
+ home.packages = [ pkgs.nano ];
+
+ home.sessionVariables = lib.mkIf config.chimera.editor.nano.defaultEditor {
+ EDITOR = "${pkgs.nano}/bin/nano";
+ };
+ };
+}