{
  lib,
  config,
  pkgs,
  ...
}: let
  cfg = config.marleyos.programs.nh;
  home = config.home.homeDirectory;
in {
  options.marleyos.programs.nh.enable = lib.mkEnableOption "nh";

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

    home.sessionVariables.FLAKE = lib.mkDefault "${home}/marleyos";

    home.shellAbbrs = {
      nhs = "nh search";
    };
  };
}
