{ config, pkgs, lib, ... }: let cfg = config.irl; in { options.irl.gui-packages = lib.mkEnableOption "GUI packages managed by home-manager"; config = { home.username = "irl"; home.homeDirectory = "/home/irl"; home.stateVersion = "25.05"; home.packages = with pkgs; [ fish neofetch starship tree ]; home.shellAliases = { hms = "home-manager switch --flake ~/.config/nix-configs#irl" + (if cfg.gui-packages then "-gui" else ""); }; programs.bash = { enable = true; initExtra = '' if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]] then shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION="" exec ${pkgs.fish}/bin/fish $LOGIN_OPTION fi ''; }; programs.firefox = lib.mkIf cfg.gui-packages { enable = true; profiles.irl = { extensions = { # packages = with pkgs.nur.repos.rycee.firefox-addons; [ # bitwarden # kagi-search # privacy-badger # ]; }; }; }; programs.fish.enable = true; programs.fzf = { enable = true; enableFishIntegration = true; }; programs.git = { delta.enable = true; enable = true; extraConfig = { diff = { algorithm = "histogram"; }; init = { defaultBranch = "main"; }; rebase = { autosquash = true; autostash = true; }; url = { "git@github.com:".pushInsteadOf = "https://github.com/"; "git@gitlab.com:".pushInsteadOf = "https://gitlab.com/"; "git@guardianproject.dev:".pushInsteadOf = "https://guardianproject.dev/"; }; user = { name = "irl"; email = "iain@learmonth.me"; }; }; }; programs.home-manager.enable = true; programs.neovim = { defaultEditor = true; enable = true; viAlias = true; vimAlias = true; vimdiffAlias = true; plugins = with pkgs.vimPlugins; [ bufferline-nvim nvim-treesitter.withAllGrammars ]; }; programs.starship = { enable = true; enableFishIntegration = true; enableInteractive = true; enableTransience = true; }; programs.zellij.enable = true; }; }