{
  lib,
  config,
  pkgs,
  ...
}:
let
  inherit (lib) mkEnableOption mkIf;

  cfg = config.marleyos.programs.neo;
in
{
  options.marleyos.programs.neo.enable = mkEnableOption "neo";

  config = mkIf cfg.enable {
    home.packages = with pkgs; [
      neo
    ];

    programs.fish.functions = {
      neo = {
        wraps = "neo";
        body = # fish
          ''
            command neo --charset=ascii $argv
          '';
      };
    };
  };
}
