{ lib, config, pkgs, ... }: with lib; { imports = [ ../development/helix.nix ]; options.terminal = { nixUpdateLocation = mkOption { type = lib.types.nullOr lib.types.str; default = null; }; flakeUpdateLocation = mkOption { type = lib.types.nullOr lib.types.str; default = null; }; homeUpdateLocation = mkOption { type = lib.types.nullOr lib.types.str; default = null; }; }; config = { home.packages = with pkgs;[ blesh (nerdfonts.override { fonts = [ "SpaceMono" ]; }) ]; home.file = { # # Building this configuration will create a copy of 'dotfiles/screenrc' in # # the Nix store. Activating the configuration will then make '~/.screenrc' a # # symlink to the Nix store copy. # ".screenrc".source = dotfiles/screenrc; # # You can also set the file content immediately. # ".gradle/gradle.properties".text = '' # org.gradle.console=verbose # org.gradle.daemon.idletimeout=3600000 # ''; #".gitconfig".source = ./dotfiles/gitconfig; }; programs = { bash = { enable = true; bashrcExtra = '' source $(blesh-share)/ble.sh bleopt canvas_winch_action=redraw-prev ''; }; git = { enable = true; delta.enable = true; extraConfig = { credential = { helper = [ "cache --timeout 21600" "${pkgs.git-credential-manager}/bin/git-credential-manager" "${pkgs.git-credential-oauth}/bin/git-credential-oauth" ]; credentialStore = "secretservice"; }; "credential \"https://dev.azure.com\"" = { useHttpPath = true; }; "credential \"https://git.worble.xyz\"" = { provider = "generic"; }; # stealing from https://blog.gitbutler.com/how-git-core-devs-configure-git/ column = { ui = "auto"; }; branch = { sort = "-committerdate"; }; tag = { sort = "version:refname"; }; diff = { algorithm = "histogram"; colorMoved = "plain"; mnemonicPrefix = true; renames = true; }; push = { followTags = true; }; fetch = { prune = true; pruneTags = true; all = true; }; rebase = { autoSquash = true; autoStash = true; updateRefs = true; }; }; }; gitui = { enable = true; }; starship.enable = true; atuin.enable = true; zellij = { enable = true; enableBashIntegration = true; settings = { theme = "dracula"; }; }; direnv = { enable = true; enableBashIntegration = true; nix-direnv.enable = true; }; helix = { enable = true; defaultEditor = true; settings = { theme = "dracula"; }; }; bat = { enable = true; }; eza = { enable = true; enableBashIntegration = true; git = true; extraOptions = [ "--color=auto" "--icons=always" "--group-directories-first" "--header" ]; }; yazi = { enable = true; settings = { manager = { sort_by = "natural"; show_hidden = true; }; }; }; bottom = { enable = true; }; fd = { enable = true; }; ripgrep = { enable = true; }; topgrade = with config.terminal;{ enable = true; settings = mkMerge [{ misc = { assume_yes = true; }; } (mkIf (nixUpdateLocation != null) { linux = { nix_arguments = "--flake ${nixUpdateLocation}"; }; }) (mkIf (homeUpdateLocation != null) { linux = { home_manager_arguments = [ "--flake" homeUpdateLocation ]; }; }) (mkIf (flakeUpdateLocation != null) { pre_commands = { nix-flake-update = "sudo nix flake update --flake ${flakeUpdateLocation}"; }; })]; }; alacritty = { enable = true; package = pkgs.alacritty; settings = { font = { normal = { family = "SpaceMono Nerd Font"; style = "Regular"; }; size = 14; }; }; }; # eh not feeling it # ghostty = { # enable = true; # enableBashIntegration = true; # settings = { # "font-family" = "SpaceMono Nerd Font"; # "font-size" = 14; # theme = "Dracula"; # }; # }; yt-dlp = { enable = true; }; }; }; }