From cbf4a44852ceed7e48eb6ee2d959df17e053377a Mon Sep 17 00:00:00 2001 From: laalsaas Date: Tue, 6 Dec 2022 21:23:25 +0100 Subject: [PATCH] blesh: init module --- .../from_md/release-notes/rl-2305.section.xml | 9 ++++++++- .../doc/manual/release-notes/rl-2305.section.md | 2 ++ nixos/modules/module-list.nix | 1 + nixos/modules/programs/bash/blesh.nix | 16 ++++++++++++++++ 4 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 nixos/modules/programs/bash/blesh.nix diff --git a/nixos/doc/manual/from_md/release-notes/rl-2305.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2305.section.xml index 0fd0382998c2..9fce1fe9bac6 100644 --- a/nixos/doc/manual/from_md/release-notes/rl-2305.section.xml +++ b/nixos/doc/manual/from_md/release-notes/rl-2305.section.xml @@ -22,7 +22,14 @@
New Services - + + + + blesh, + a line editor written in pure bash. Available as + programs.bash.blesh. + + fzf, diff --git a/nixos/doc/manual/release-notes/rl-2305.section.md b/nixos/doc/manual/release-notes/rl-2305.section.md index 39550d44733a..f196581080f0 100644 --- a/nixos/doc/manual/release-notes/rl-2305.section.md +++ b/nixos/doc/manual/release-notes/rl-2305.section.md @@ -14,6 +14,8 @@ In addition to numerous new and upgraded packages, this release has the followin +- [blesh](https://github.com/akinomyoga/ble.sh), a line editor written in pure bash. Available as [programs.bash.blesh](#opt-programs.bash.blesh.enable). + - [fzf](https://github.com/junegunn/fzf), a command line fuzzyfinder. Available as [programs.fzf](#opt-programs.fzf.fuzzyCompletion). ## Backward Incompatibilities {#sec-release-23.05-incompatibilities} diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 9faa58409b19..18772d057eca 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -135,6 +135,7 @@ ./programs/bandwhich.nix ./programs/bash/bash.nix ./programs/bash/bash-completion.nix + ./programs/bash/blesh.nix ./programs/bash/ls-colors.nix ./programs/bash/undistract-me.nix ./programs/bash-my-aws.nix diff --git a/nixos/modules/programs/bash/blesh.nix b/nixos/modules/programs/bash/blesh.nix new file mode 100644 index 000000000000..0a9aa6242425 --- /dev/null +++ b/nixos/modules/programs/bash/blesh.nix @@ -0,0 +1,16 @@ +{ lib, config, pkgs, ... }: +with lib; +let + cfg = config.programs.bash.blesh; +in { + options = { + programs.bash.blesh.enable = mkEnableOption (mdDoc "blesh"); + }; + + config = mkIf cfg.enable { + programs.bash.interactiveShellInit = mkBefore '' + source ${pkgs.blesh}/share/ble.sh + ''; + }; + meta.maintainers = with maintainers; [ laalsaas ]; +}