{ "packages": [ "fzf@latest", "starship@latest", "ripgrep@latest", "gh@latest", "zoxide@latest", "tmux@latest", "go@latest", "cargo@latest", "wl-clipboard@latest", "statix@latest", "path:devbox.d/neovim", "git-credential-oauth@latest", "git-credential-manager@latest", "gitFull@latest", "delta@latest", "luarocks@latest", "ghq@latest", "tree@latest", "difftastic@latest", "tig@latest", "tree-sitter@latest", "chezmoi@latest", "bitwarden-cli@latest", "atuin@latest", "nerd-fonts.hack@latest", "nerd-fonts.noto@latest", "nerd-fonts.fira-code@latest", "fd@latest", "libuuid@latest", "dconf@latest", "jq@latest", "podman@latest", "python312@latest", "jdk21@latest", "unzip@latest", "p7zip@latest", "evtest@latest", "gcc@latest", "blesh@latest", "dos2unix@latest", "htop@latest", "gemini-cli@latest", "geminicommit@latest", ], "env": { "EDITOR": "vi", "VISUAL": "vi", "NIX_CONFIG": "experimental-features = nix-command flakes", }, "shell": { "init_hook": [ "[ \"${-#*i}\" == \"$-\" ] || [ ! -t 0 ] || [ -z \"$PS1\" ] && return", "[ -f $(blesh-share)/ble.sh ] && source $(blesh-share)/ble.sh --noattach", // nix-ld must be enabled on the nix host // "programs.nix-ld.enable = true;" "uname -v | grep -q 'NixOS' && export NIX_LD=$(nix eval --impure --raw --expr '", "let", " pkgs = import {};", " NIX_LD = pkgs.lib.fileContents \"${pkgs.stdenv.cc}/nix-support/dynamic-linker\";", "in NIX_LD", "')", "command -v starship >/dev/null 2>&1 && eval \"$(starship init bash --print-full-init)\"", "command -v zoxide >/dev/null 2>&1 && eval \"$(zoxide init bash)\" && alias cd='z'", "export SUDO_EDITOR=$DEVBOX_PACKAGES_DIR/bin/nvim", "set -o vi", "command -v atuin >/dev/null 2>&1 && eval \"$(atuin init --disable-up-arrow bash)\"", "for f in \"$DEVBOX_PACKAGES_DIR/share/bash-completion/completions/\"*; do", " [ $(basename $f) = Makemodule.am ] || [ $(basename $f) = enosys ] && continue", " source \"$f\"", "done", "[[ ! ${BLE_VERSION-} ]] || ble-attach", ], "scripts": { "config-edit": [ "$EDITOR $(devbox global path)/devbox.json", ], "config-pull": [ "devbox global pull https://github.com/rbelem/devbox-global.git", ], "config-push": [ "devbox global push https://github.com/rbelem/devbox-global.git", ], "first-install": [ "devbox global run setup-git", "devbox global run setup-tmux", "devbox global run setup-nerd-fonts", "devbox global run setup-themes", "devbox global run setup-neovim", ], "setup-nerd-fonts": [ "PREFIX=$(nix path-info $(devbox global path)/devbox.d/nerdfonts)", "NERDFONTS_DIR=$PREFIX/share/fonts/truetype/NerdFonts", "mkdir -p $HOME/.config/fontconfig/conf.d", "cat < $HOME/.config/fontconfig/conf.d/10-nerdfonts.conf", "", "", "", " $NERDFONTS_DIR", "", "EOF", "fc-cache -fv", ], "setup-neovim": [ "git clone https://github.com/rbelem/nvchad-custom $HOME/.config/nvim", ], "setup-devbox": [ "mkdir -p $HOME/.bashrc.d", "cat < $HOME/.bashrc.d/90-devbox.sh", "[ ! -t 0 ] || [ -z \"\\$PS1\" ] && return", "source <(devbox completion bash)", "source <(devbox global shellenv --init-hook)", "EOF", ], "setup-devbox-bashrc": [ "cat <> $HOME/.bashrc", "", "# User specific aliases and functions", "if [ -d ~/.bashrc.d ]; then", " for rc in ~/.bashrc.d/*; do", " if [ -f \"\\$rc\" ]; then", " . \"\\$rc\"", " fi", " done", "fi", "", "unset rc", "EOF", ], "setup-flatpak": [ "flatpak remote-add --if-not-exists --user flathub https://dl.flathub.org/repo/flathub.flatpakrepo", "flatpak remote-add --if-not-exists --user flathub-beta https://dl.flathub.org/beta-repo/flathub-beta.flatpakrepo", "rm -rf $HOME/.local/share/fonts", "uname -v | grep -q 'NixOS' \\", " && ln -sf /run/current-system/sw/share/X11/fonts $HOME/.local/share/fonts \\", " || ln -sf /usr/share/fonts/X11 $HOME/.local/share/fonts", "flatpak --user override --filesystem=$HOME/.local/share/fonts", "mkdir -p $HOME/.icons", "mkdir -p $HOME/.local/share/icons", "ln -sf $(nix eval --raw nixpkgs#breeze-icons.outPath)/share/icons/breeze $HOME/.icons/default", "flatpak --user override --filesystem=$HOME/.icons", "ln -sf $(nix eval --raw nixpkgs#breeze-icons.outPath)/share/icons/breeze $HOME/.local/share/icons/default", "flatpak --user override --filesystem=$HOME/.local/share/icons", ], "setup-git": [ "git config --global ghq.root $HOME/Workspace", "for gitconfig in $(git config --get-regexp includeif.gitdir | awk '{print $1}'); do", " dirname=${gitconfig%.path}", " git config --global --remove-section $dirname", "done", "sections=\"", " alias", " core", " credential.https://dev.azure.com", " credential", " delta", " difftool.difftastic", " diff", " http", " http.https://*.*.local", " include", " init", " interactive", " merge", "\"", "for section in $sections; do", " git config --global --get-regexp '^$section' > /dev/null 2>&1 \\", " && git config --global --remove-section $section", "done", "git config --global user.name 'Rodrigo Belem'", "git config --global user.email rodrigo.belem@gmail.com", "for gitconfig in $(find $(ghq root) -maxdepth 3 -name .gitconfig); do", " dirname=$(dirname $gitconfig)", " dirname=${dirname%/}/", " git config --global includeif.gitdir:${dirname}.path \"$gitconfig\"", "done", "git config --global alias.br branch", "git config --global alias.ci commit", "git config --global alias.co checkout", "git config --global branch.autosetupmerge always", "git config --global branch.autosetuprebase always", "git config --global commit.verbose true", "git config --global init.defaultBranch main", "git config --global --bool http.'https://*.*.local'.sslverify false", "git config --global --add credential.helper cache", "git config --global --add credential.helper libsecret", "git config --global credential.cacheOptions '--timeout=7200'", "git config --global credential.credentialStore secretservice", "git config --global --add credential.https://bitbucket.org.helper cache", "git config --global --add credential.https://bitbucket.org.helper manager", "git config --global --add credential.https://dev.azure.com.helper cache", "git config --global --add credential.https://dev.azure.com.helper manager", "git config --global --add credential.https://github.com.helper cache", "git config --global --add credential.https://github.com.helper oauth", "git config --global --add credential.https://gitlab.com.helper cache", "git config --global --add credential.https://gitlab.com.helper oauth", "git config --global credential.https://dev.azure.com.useHttpPath true", "git config --global core.pager 'less -RF'", "git config --global pager.delta delta", "git config --global alias.delta diff", "git config --global interactive.diffFilter 'delta --color-only'", "mkdir -p $HOME/.local/share/delta", "curl -sLJ https://github.com/dandavison/delta/raw/main/themes.gitconfig \\", " -o $HOME/.local/share/delta/themes.gitconfig", "git config --global include.path $HOME/.local/share/delta/themes.gitconfig", "git config --global diff.colorMoved default", "git config --global diff.guitool meld", "git config --global diff.tool difftastic", "git config --global difftool.difftastic.cmd 'difft \"$LOCAL\" \"$REMOTE\"'", "git config --global delta.features calochortus-lyallii", "git config --global delta.line-numbers-minus-style 'bold \"#b10036\"'", "git config --global delta.line-numbers-plus-style 'bold \"#00b136\"'", "git config --global delta.max-line-length 1024", "git config --global delta.navigate true", "git config --global delta.pager 'less -RF'", "git config --global delta.side-by-side true", "git config --global delta.tabs 2", "git config --global delta.true-color always", "git config --global merge.conflictstyle diff3", "git config --global merge.guitool meld", "git config --global merge.tool vimdiff", "git config --global mergetool.vimdiff.cmd \"nvim -d $LOCAL $REMOTE $MERGED -c '$wincmd w' -c 'wincmd J'\"", ], "setup-podman": [ "mkdir -p $HOME/.config/containers", "cat < $HOME/.config/containers/policy.json", "{", " \"default\": [{\"type\": \"insecureAcceptAnything\"}],", " \"transports\": {\"docker-daemon\": {\"\": [{\"type\":\"insecureAcceptAnything\"}]}}", "}", "EOF", ], "setup-themes": [ "ghq get https://github.com/Gogh-Co/Gogh.git", "[ $XDG_SESSION_DESKTOP = KDE ] && export TERMINAL=konsole", "[ $XDG_CURRENT_DESKTOP = ubuntu:GNOME ] && export TERMINAL=gnome-terminal", "$(ghq root)/github.com/Gogh-Co/Gogh/installs/kanagawa.sh", ], "setup-tmux": [ "[ -d $HOME/.tmux ] || git clone https://github.com/gpakosz/.tmux $HOME/.tmux", "ln -sf $HOME/.tmux/.tmux.conf $HOME/.tmux.conf", "ln -sf $(devbox global path)/dotfiles/.tmux.conf.local $HOME/.tmux.conf.local", "mkdir -p $HOME/.local/bin", "cat < $HOME/.local/bin/t", "#!/usr/bin/env sh", "ARG=$(readlink -f $@)", "cd $HOME/.tmux/plugins/tmux-session-wizard/bin", "./t $ARG", "EOF", "chmod u+x $HOME/.local/bin/t", ], "setup-kde-secrets-service": [ "mkdir -p $HOME/.local/share/dbus-1/services", "cat < $HOME/.local/share/dbus-1/services/org.freedesktop.secrets.service", "[D-BUS Service]", "Name=org.freedesktop.secrets", "Exec=/usr/bin/kwalletd5", "EOF", ], }, }, }