{ pkgs, config, lib, ... }:

with lib;

let
  cfg = config.settings.applications.common;
in {
  options = {
    settings.applications.common.enable = lib.mkOption {
      type = lib.types.bool;
      description = ''
        Enable common applications
      '';
    };
  };

  config = mkIf cfg.enable {
    environment.systemPackages = with pkgs; [
      usbutils
      tree
      fastfetch
      btop
      git
      yazi
      zoxide
      home-manager

      just
    ];

    environment.pathsToLink = [ "/share/zsh" ];

    programs.zsh.enable = true;
    users.defaultUserShell = pkgs.zsh;
  };
}
