Compare commits

...
Sign in to create a new pull request.

22 commits

Author SHA1 Message Date
Blake Ridgway
a858dd8309 fix: changed gitconfig to look at ~/ instead of hardcoded path 2025-07-12 16:04:15 -05:00
Blake Ridgway
96ac5f4de3 feat: Added Signal and Discord flatpaks 2025-06-11 20:28:33 -05:00
Blake Ridgway
f2fc37b7dc
Merge pull request #3 from blakeridgway/poc/install-rewrite
Modularize Post-Install Setup System
2025-05-23 23:06:00 -05:00
Blake Ridgway
b1b7d61769 docs: update README and refactor IDE package installation
- Update README to reflect new modular setup architecture
- Document all installed packages, scripts, and post-install tasks
- Add clear instructions for supported distributions and customization

- Move Visual Studio Code installation to main package script
- Add JetBrains Rider to package installation
- Remove redundant VS Code install from Fedora .NET script
- Consolidate IDE installations in single location for better organization
2025-05-23 23:02:34 -05:00
Blake Ridgway
71ad3511e4 chore: archive old post_install.sh script
Moved legacy monolithic script to .archive/ before implementing
modular setup system.
2025-05-23 22:56:38 -05:00
Blake Ridgway
61004e0967 refactor: modularize post-install setup script
Break down monolithic script into focused components:
- 00-system-prep.sh: system updates and Flathub
- 01-package-install.sh: system packages and Flatpaks
- 02-dev-tools-setup.sh: Neovim, fonts, shell tools
- 03-fedora-dotnet-setup.sh: .NET development environment
- 04-config-symlinks.sh: dotfile symlinking

Fixes:
- Use rpm -q for accurate package checks
- Dynamic Fedora version detection
- Replace neofetch with fastfetch
- Correct dotfile names (aliases.zsh, commit-conventions.txt)
2025-05-23 22:54:14 -05:00
Blake Ridgway
a1c28c4225
Create temp_dotnet_checklist.md 2025-05-22 16:06:12 -05:00
Blake Ridgway
251194b35c Added nvim to zshrc 2024-09-13 13:27:40 -05:00
Blake Ridgway
11817d7226 (feat): Added nvim to the install 2024-09-13 13:27:23 -05:00
Blake Ridgway
e34d5719ea (feat): Changed micro to nvim 2024-09-13 13:27:01 -05:00
Blake Ridgway
a1312295bc (chore): removed nushell references 2024-08-30 19:28:18 -05:00
Blake Ridgway
c4bd753289 (feat): Added/Remove apps, cleaned up script 2024-08-30 19:27:16 -05:00
Blake Ridgway
e3b38c2d02 (feat): Added/Remove apps, cleaned up script 2024-08-30 19:27:11 -05:00
Blake Ridgway
5659361bab (feat): Added auto selection of distro 2024-08-30 19:15:11 -05:00
Blake Ridgway
1a2ab0d220 updated back to Fedora 2024-08-12 13:19:24 -05:00
Blake Ridgway
5271e4b15c Merge pull request 'NuShell + Steam Speed Fix' (#3) from refresh_somethings into master
Reviewed-on: http://149.76.112.184:3000/blake/dotfiles/pulls/3
2024-04-26 14:13:06 -05:00
Blake Ridgway
4148041254 (feat): Added aliases 2024-04-20 10:20:44 -05:00
Blake Ridgway
4684e80525 (feat): Added steam_dev.cfg 2024-04-20 10:06:47 -05:00
Blake Ridgway
93fc906041 (feat): Added nushell config 2024-04-20 09:56:30 -05:00
Blake Ridgway
6bb1a67713 (feat): Rewriting install script, removed hack stuff 2024-04-19 21:32:03 -05:00
Blake Ridgway
bd5dc7c024 (feat): Changed to Tux from Fedora Logo 2024-04-19 20:46:41 -05:00
Blake Ridgway
1e34e55e4a Merge pull request 'debian-rewrite' (#1) from debian-rewrite into master
Reviewed-on: http://172.16.5.30:3000/blake/dotfiles/pulls/1
2024-04-13 22:27:51 -05:00
32 changed files with 2228 additions and 212 deletions

173
.archive/post_install.sh Executable file
View file

@ -0,0 +1,173 @@
#!/bin/bash
# A script for setting up post install
# Relies on Flatpak to be installed
# Created by Blake Ridgway
# Function to detect the Linux distribution
detect_linux_distro() {
if [ -f /etc/os-release ]; then
. /etc/os-release
echo "$ID"
elif [ -f /etc/lsb-release ]; then
. /etc/lsb-release
echo "$DISTRIBUTOR_ID"
elif [ -f /etc/debian_version ]; then
echo "debian"
elif [ -f /etc/redhat-release ]; then
echo "redhat"
else
echo "unknown"
fi
}
# Detect the Linux distribution
DISTRO=$(detect_linux_distro)
# Determine the appropriate package manager
case "$DISTRO" in
fedora|rhel|centos)
PACKAGE_MANAGER="dnf"
;;
debian|ubuntu|pop)
PACKAGE_MANAGER="apt"
;;
*)
echo "Unsupported distribution: $DISTRO"
exit 1
;;
esac
# Update system before installing packages
if [ "$PACKAGE_MANAGER" == "dnf" ]; then
sudo dnf update && sudo dnf upgrade
elif [ "$PACKAGE_MANAGER" == "apt" ]; then
sudo apt update && sudo apt upgrade -y
fi
# Setup Flatpak
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
PACKAGE_LIST=(
btop
curl
git
gh
fd-find
flatpak
libfontconfig-dev
libssl-dev
neofetch
python3
python3-pip
ripgrep
virt-manager
zsh
)
FLATPAK_LIST=(
com.bitwarden.desktop
com.github.tchx84.Flatseal
com.valvesoftware.Steam
net.davidotek.pupgui2
net.veloren.airshipper
org.videolan.VLC
)
echo #######################
echo # Installing Packages #
echo #######################
for package_name in ${PACKAGE_LIST[@]}; do
if [ "$PACKAGE_MANAGER" == "dnf" ]; then
if ! dnf list --installed | grep -q "^\<$package_name\>"; then
echo "Installing $package_name..."
sleep .5
sudo dnf install "$package_name" -y
echo "$package_name has been installed"
else
echo "$package_name already installed"
fi
elif [ "$PACKAGE_MANAGER" == "apt" ]; then
if ! dpkg -l | grep -q "^\<ii\> $package_name"; then
echo "Installing $package_name..."
sleep .5
sudo apt install "$package_name" -y
echo "$package_name has been installed"
else
echo "$package_name already installed"
fi
fi
done
for flatpak_name in ${FLATPAK_LIST[@]}; do
if ! flatpak list | grep -q $flatpak_name; then
flatpak install "$flatpak_name" -y
else
echo "$flatpak_name already installed"
fi
done
echo ###################
echo # Setting up NVIM #
echo ###################
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz
sudo rm -rf /opt/nvim
sudo tar -C /opt -xzf nvim-linux64.tar.gz
echo ##########
echo # pynvim #
echo ##########
/usr/bin/python3 -m pip install pynvim
echo #####################
echo # Install Nerd Font #
echo #####################
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.0.2/Hack.zip && unzip Hack.zip -d Hack
mkdir -p ~/.local/share/fonts && cp Hack/HackNerdFont-Regular.ttf ~/.local/share/fonts
fc-cache -f -v
rm -rf Hack*
echo ######################
echo # Installing OhMyZSH #
echo ######################
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
echo ###################
echo # Install Rust Up #
echo ###################
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
echo ##################
echo # Setup Starship #
echo ##################
curl -sS https://starship.rs/install.sh | sh
echo ###############
echo # Config File #
echo ###############
cp terminal/starship.toml ~/.config/starship.toml
# Symlink files
FILES=('vimrc' 'vim' 'zshrc' 'zsh' 'agignore' 'gitconfig' 'gitignore' 'gitmessage' 'aliases')
for file in ${FILES[@]}; do
echo ""
echo "Simlinking $file to $HOME"
ln -sf "$PWD/$file" "$HOME/.$file"
if [ $? -eq 0 ]; then
echo "$PWD/$file ~> $HOME/.$file"
else
echo 'Install failed to symlink.'
exit 1
fi
done

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,45 +0,0 @@
The work in the Hack project is Copyright 2018 Source Foundry Authors and licensed under the MIT License
The work in the DejaVu project was committed to the public domain.
Bitstream Vera Sans Mono Copyright 2003 Bitstream Inc. and licensed under the Bitstream Vera License with Reserved Font Names "Bitstream" and "Vera"
### MIT License
Copyright (c) 2018 Source Foundry Authors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
### BITSTREAM VERA LICENSE
Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is a trademark of Bitstream, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of the fonts accompanying this license ("Fonts") and associated documentation files (the "Font Software"), to reproduce and distribute the Font Software, including without limitation the rights to use, copy, merge, publish, distribute, and/or sell copies of the Font Software, and to permit persons to whom the Font Software is furnished to do so, subject to the following conditions:
The above copyright and trademark notices and this permission notice shall be included in all copies of one or more of the Font Software typefaces.
The Font Software may be modified, altered, or added to, and in particular the designs of glyphs or characters in the Fonts may be modified and additional glyphs or characters may be added to the Fonts, only if the fonts are renamed to names not containing either the words "Bitstream" or the word "Vera".
This License becomes null and void to the extent applicable to Fonts or Font Software that has been modified and is distributed under the "Bitstream Vera" names.
The Font Software may be sold as part of a larger software package but no copy of one or more of the Font Software typefaces may be sold by itself.
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
Except as contained in this notice, the names of Gnome, the Gnome Foundation, and Bitstream Inc., shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Font Software without prior written authorization from the Gnome Foundation or Bitstream Inc., respectively. For further information, contact: fonts at gnome dot org.

View file

@ -1,8 +0,0 @@
# Nerd Fonts
This is an archived font from a Nerd Fonts release.
For more information see:
* https://github.com/ryanoasis/nerd-fonts/
* https://github.com/ryanoasis/nerd-fonts/releases/latest/

124
README.md
View file

@ -1,19 +1,123 @@
# Fresh Install
This is a collection of items I use when I setup a fresh install.
This is a collection of scripts and dotfiles I use when setting up a fresh Linux installation.
## Install
## Quick Start
./post_install will run a script that installs the software that I use on daily basis, and if you have all the necessary programs installed. If you don't, it installs them for you! Once the dependencies are installed, it will run any third party installations, and create symlinks for the necessary config files in the correct locations.
Run the main setup script to install software, configure development tools, and symlink dotfiles:
### Dotfiles
```bash
./main-setup.sh
```
Here's my collection of dotfiles I use on Linux environments. I continuously add to this repo over time, as I customise my dev environment. Feel free to fork this and modify the scripts/dotfiles to suit your own needs!
The script will automatically detect your Linux distribution (Fedora, Ubuntu, Debian, etc.) and use the appropriate package manager.
Git Make sure to edit the gitconfig and add your credentials instead of mine
## What Gets Installed
VIM Installation Tips I use neovim and vim-plug. So if you're using regular vim you might want to remove the neovim specific plugins from my vimrc. Also, you might need to run :PlugClean to remove the plugin directories then run :PlugInstall to reinstall them.
### Core Packages
- Development tools: `git`, `gh`, `curl`, `wget`, `ripgrep`, `fd-find`
- System utilities: `btop`, `fastfetch`, `zsh`, `flatpak`
- Virtualization: `virt-manager`
- Python: `python3`, `python3-pip`
### Development Environment
- **Neovim** (latest version from GitHub)
- **Hack Nerd Font** for terminal
- **Oh My Zsh** shell framework
- **Starship** prompt
- **Rust** toolchain via rustup
### Fedora-Specific (.NET Development)
On Fedora systems, additional packages are installed:
- **Visual Studio Code**
- **.NET SDK** (with Microsoft repository)
- **PostgreSQL** server and tools
- **Docker** (moby-engine) with Docker Compose
### Flatpak Applications
- Bitwarden
- Flatseal
- Steam
- ProtonUp-Qt
- Rider
- Veloren Airshipper
- Visual Studio Code
- VLC Media Player
## Modular Architecture
The setup is broken down into focused scripts:
- `00-system-prep.sh` - System updates and Flathub setup
- `01-package-install.sh` - Core packages and Flatpak apps
- `02-dev-tools-setup.sh` - Development tools (Neovim, fonts, shell)
- `03-fedora-dotnet-setup.sh` - Fedora-specific .NET environment
- `04-config-symlinks.sh` - Dotfile symlinking
You can run individual scripts if you only need specific components.
## Dotfiles
The following configuration files will be symlinked to your home directory:
- `.vimrc` & `.vim/` - Vim/Neovim configuration
- `.zshrc` & `.zsh/` - Zsh shell configuration
- `.gitconfig` - Git configuration (**edit with your credentials**)
- `.gitignore` - Global Git ignore patterns
- `.agignore` - Silver Searcher ignore patterns
- `.aliases` - Shell aliases (from `aliases.zsh`)
- `.gitmessage` - Git commit template (from `commit-conventions.txt`)
### Git Configuration
**Important:** Edit `gitconfig` and replace my credentials with yours before running the setup.
### Vim/Neovim Setup
I use Neovim with vim-plug for plugin management. If you're using regular Vim, you may need to:
1. Remove Neovim-specific plugins from `.vimrc`
2. Run `:PlugClean` to remove plugin directories
3. Run `:PlugInstall` to reinstall compatible plugins
## Post-Installation Tasks
After running the setup, remember to:
1. **Configure Git with your details:**
```bash
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"
```
2. **Generate SSH key:**
```bash
ssh-keygen -t ed25519 -C ${USER}@$(hostname --fqdn)
```
3. **Install Powerlevel10k gitstatus (if using):**
```bash
~/.oh-my-zsh/custom/themes/powerlevel10k/gitstatus/install -f
```
4. **Log out and back in** for Docker group changes to take effect (Fedora)
5. **Install VS Code extensions** (Fedora):
- C# Dev Kit
- GitLens
- Prettier
- NuGet Package Manager GUI
## Supported Distributions
- **Fedora** (with full .NET development environment)
- **Ubuntu/Debian** (core packages and development tools)
- **Pop!_OS** (core packages and development tools)
## Customization
Feel free to fork this repository and modify the scripts/dotfiles to suit your needs. The modular structure makes it easy to add, remove, or modify specific components.
## Legacy
The original monolithic `post_install.sh` script has been archived in `.archive/` for reference.
*Things to Remember*
`~/.oh-my-zsh/custom/themes/powerlevel10k/gitstatus/install -f`
`ssh-keygen -t ed25519 -C ${USER}@$(hostname --fqdn)`

View file

@ -57,8 +57,8 @@ alias tmuxreload='source ~/.tmux.conf'
alias zshreload='source ~/.zshrc'
# nvim
alias vim=micro
alias vi=micro
alias vim=nvim
alias vi=nvim
# Configuration
alias vimrc='nvim ~/.vimrc'

View file

@ -2,7 +2,7 @@
email = blake@blakeridgway.dev
name = Blake Ridgway
[commit]
template = /home/blake/dotfiles/commit-conventions.txt
template = ~/dotfiles/commit-conventions.txt
[core]
editor = nvim +14 -c +startinsert
[init]

110
main-setup.sh Executable file
View file

@ -0,0 +1,110 @@
#!/bin/bash
# Main setup script
# Calls other scripts to perform post-installation tasks.
# --- Global Variables & Helper Functions ---
# SCRIPT_ROOT_DIR will be the directory where main-setup.sh is located
export SCRIPT_ROOT_DIR
SCRIPT_ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
export SCRIPTS_DIR="${SCRIPT_ROOT_DIR}/scripts"
# Function to detect the Linux distribution
detect_linux_distro() {
if [ -f /etc/os-release ]; then
# shellcheck disable=SC1091
. /etc/os-release
echo "$ID"
elif [ -f /etc/lsb-release ]; then
# shellcheck disable=SC1091
. /etc/lsb-release
echo "$DISTRIBUTOR_ID"
elif [ -f /etc/debian_version ]; then
echo "debian"
elif [ -f /etc/redhat-release ]; then
if grep -qi "fedora" /etc/redhat-release; then
echo "fedora"
elif grep -qi "centos" /etc/redhat-release; then
echo "centos"
elif grep -qi "red hat enterprise linux" /etc/redhat-release; then
echo "rhel"
else
echo "redhat"
fi
else
echo "unknown"
fi
}
# Detect the Linux distribution and set package manager
export DISTRO
DISTRO=$(detect_linux_distro)
export PACKAGE_MANAGER
case "$DISTRO" in
fedora|rhel|centos)
PACKAGE_MANAGER="dnf"
;;
debian|ubuntu|pop)
PACKAGE_MANAGER="apt"
;;
*)
echo "Unsupported distribution: $DISTRO"
exit 1
;;
esac
echo "Detected Distribution: $DISTRO"
echo "Using Package Manager: $PACKAGE_MANAGER"
echo "Script Root Directory: $SCRIPT_ROOT_DIR"
echo "--------------------------------------------------"
# --- Execute Setup Scripts ---
echo "Executing 00-system-prep.sh..."
if ! bash "${SCRIPTS_DIR}/00-system-prep.sh"; then
echo "ERROR: 00-system-prep.sh failed."
exit 1
fi
echo "--------------------------------------------------"
echo "Executing 01-package-install.sh..."
if ! bash "${SCRIPTS_DIR}/01-package-install.sh"; then
echo "ERROR: 01-package-install.sh failed."
exit 1
fi
echo "--------------------------------------------------"
echo "Executing 02-dev-tools-setup.sh..."
if ! bash "${SCRIPTS_DIR}/02-dev-tools-setup.sh"; then
echo "ERROR: 02-dev-tools-setup.sh failed."
exit 1
fi
echo "--------------------------------------------------"
if [ "$DISTRO" == "fedora" ]; then
echo "Executing 03-fedora-dotnet-setup.sh..."
if ! bash "${SCRIPTS_DIR}/03-fedora-dotnet-setup.sh"; then
echo "ERROR: 03-fedora-dotnet-setup.sh failed."
# Decide if this is a fatal error for the whole script
# exit 1
fi
echo "--------------------------------------------------"
fi
echo "Executing 04-config-symlinks.sh..."
if ! bash "${SCRIPTS_DIR}/04-config-symlinks.sh"; then
echo "ERROR: 04-config-symlinks.sh failed."
# exit 1
fi
echo "--------------------------------------------------"
echo ""
echo "#####################################"
echo # Main setup script finished! #
echo #####################################"
echo "Please review the output for any manual steps or errors."
echo "You may need to restart your terminal or log out/log in for all changes to take effect."
exit 0

View file

@ -1,145 +0,0 @@
#!/bin/bash
# A script for setting up post install
# Relies on Flatpak to be installed
# Created by Blake Ridgway
# Check to see if running as sudo/root
#if [ "$(id -u)" -ne 0 ]; then
# echo 'This script must be run by root' >&2
# exit 1
#fi
# Update system
sudo apt update && sudo apt upgrade
PACKAGE_LIST=(
bpytop
cargo
curl
git
golang
fd-find
flatpak
#kitty
micro
neofetch
#neovim
plasma-discover-backend-flatpak
python3
python3-pip
ripgrep
#ruby
solaar
tilix
virt-manager
zsh
)
FLATPAK_LIST=(
com.bitwarden.desktop
net.davidotek.pupgui2
#net.veloren.airshipper
)
echo #######################
echo # Installing Packages #
echo #######################
for package_name in ${PACKAGE_LIST[@]}; do
if ! apt list --installed | grep -q "^\<$package_name\>"; then
echo "Installing $package_name..."
sleep .5
sudo apt install "$package_name" -y
echo "$package_name has been installed"
else
echo "$package_name already installed"
fi
done
# Verify flatpak is engaged properly
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
for flatpak_name in ${FLATPAK_LIST[@]}; do
if ! flatpak list | grep -q $flatpak_name; then
flatpak install "$flatpak_name" -y
else
echo "$package_name already installed"
fi
done
echo #######
echo # SSH #
echo #######
ssh-keygen -t ed25519 -C ${USER}@$(hostname --fqdn)
echo ##########
echo # pynvim #
echo ##########
/usr/bin/python3 -m pip install pynvim
echo #####################
echo # Install Nerd Font #
echo #####################
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.0.2/Hack.zip && unzip Hack.zip -d Hack
mkdir -p ~/.local/share/fonts && cp Hack/HackNerdFont-Regular.ttf ~/.local/share/fonts
fc-cache -f -v
echo ######################
echo # Installing OhMyZSH #
echo ######################
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
echo ##################
echo # Setup Starship #
echo ##################
curl -sS https://starship.rs/install.sh | sh
echo ###############
echo # Config File #
echo ###############
cp terminal/starship.toml ~/.config/starship.toml
echo ###################
echo # Setting up nvim #
echo ###################
cp -r nvim/ ~/.config/nvim/
echo #######################
echo # Cleanup and Updates #
echo #######################
sudo apt upgrade
flatpak update
echo ################
echo # File Cleanup #
echo ################
rm -r *.ttf *.zip
# Symlink files
FILES=('vimrc' 'vim' 'zshrc' 'zsh' 'agignore' 'gitconfig' 'gitignore' 'gitmessage' 'aliases')
for file in ${FILES[@]}; do
echo ""
echo "Simlinking $file to $HOME"
ln -sf "$PWD/$file" "$HOME/.$file"
if [ $? -eq 0 ]; then
echo "$PWD/$file ~> $HOME/.$file"
else
echo 'Install failed to symlink.'
exit 1
fi
done

34
scripts/00-system-prep.sh Executable file
View file

@ -0,0 +1,34 @@
#!/bin/bash
# 00-system-prep.sh
# Updates system and sets up Flathub.
# Relies on DISTRO and PACKAGE_MANAGER being set by the caller.
echo "--- Starting System Preparation ---"
if [ -z "$DISTRO" ] || [ -z "$PACKAGE_MANAGER" ]; then
echo "ERROR: DISTRO and PACKAGE_MANAGER must be set in the environment."
exit 1
fi
# Update system before installing packages
echo "Updating system packages..."
if [ "$PACKAGE_MANAGER" == "dnf" ]; then
sudo dnf update -y && sudo dnf upgrade -y
elif [ "$PACKAGE_MANAGER" == "apt" ]; then
sudo apt update && sudo apt upgrade -y
else
echo "WARNING: Unknown package manager '$PACKAGE_MANAGER'. Skipping system update."
fi
# Setup Flatpak
echo "Setting up Flathub repository..."
if command -v flatpak &> /dev/null; then
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
else
echo "WARNING: flatpak command not found. Skipping Flathub setup."
echo "Ensure Flatpak is installed via 01-package-install.sh or manually."
fi
echo "--- System Preparation Finished ---"

126
scripts/01-package-install.sh Executable file
View file

@ -0,0 +1,126 @@
#!/bin/bash
# 01-package-install.sh
# Installs system packages and Flatpak applications.
# Relies on DISTRO and PACKAGE_MANAGER being set by the caller.
echo "--- Starting Package Installation ---"
if [ -z "$DISTRO" ] || [ -z "$PACKAGE_MANAGER" ]; then
echo "ERROR: DISTRO and PACKAGE_MANAGER must be set in the environment."
exit 1
fi
# Define base package list
BASE_PACKAGE_LIST=(
btop
curl
git
gh
fd-find
flatpak
python3
python3-pip
ripgrep
virt-manager
zsh
wget
unzip
)
# Distro-specific packages to add to the main list
DISTRO_SPECIFIC_PACKAGES=()
if [ "$PACKAGE_MANAGER" == "dnf" ]; then
DISTRO_SPECIFIC_PACKAGES+=(
"fontconfig-devel" # for fc-cache
"openssl-devel" # for various compilations
"util-linux-user" # for chsh, if needed by OhMyZsh script
)
elif [ "$PACKAGE_MANAGER" == "apt" ]; then
DISTRO_SPECIFIC_PACKAGES+=(
"libfontconfig-dev"
"libssl-dev"
"fd-find" # On Debian/Ubuntu, binary is fdfind, symlink to fd often needed
# Or user might prefer 'fd' package if available from other sources
)
fi
# Combine package lists
PACKAGE_LIST=("${BASE_PACKAGE_LIST[@]}" "${DISTRO_SPECIFIC_PACKAGES[@]}")
PACKAGE_LIST=($(printf "%s\n" "${PACKAGE_LIST[@]}" | LC_ALL=C sort -u))
FLATPAK_LIST=(
com.bitwarden.desktop
com.discordapp.Discord
com.github.tchx84.Flatseal
com.jetbrains.Rider
com.valvesoftware.Steam
com.visualstudio.code
net.davidotek.pupgui2
net.veloren.airshipper
org.signal.Signal
org.videolan.VLC
)
echo "Installing System Packages..."
for package_name in "${PACKAGE_LIST[@]}"; do
if [ "$PACKAGE_MANAGER" == "dnf" ]; then
if ! rpm -q "$package_name" &>/dev/null; then
echo "Installing $package_name (dnf)..."
if sudo dnf install "$package_name" -y; then
echo "$package_name has been installed."
else
echo "WARNING: Failed to install $package_name. It may not be available in the repositories."
fi
else
echo "$package_name already installed."
fi
elif [ "$PACKAGE_MANAGER" == "apt" ]; then
# For apt, check if package provides the command or is installed
# dpkg-query is generally more reliable for checking installed status
actual_package_name=$package_name
if [ "$package_name" == "fd-find" ] && ! dpkg -s fd-find &>/dev/null ; then
# On some newer Ubuntu/Debian, 'fd-find' might be the package,
# but user might want 'fd' if it's a different source or a metapackage.
# For now, we stick to fd-find.
: # Keep actual_package_name as fd-find
fi
if ! dpkg-query -W -f='${Status}' "$actual_package_name" 2>/dev/null | grep -q "ok installed"; then
echo "Installing $actual_package_name (apt)..."
sudo apt install "$actual_package_name" -y
echo "$actual_package_name has been installed."
else
echo "$actual_package_name already installed."
fi
fi
done
# Post-install for fd-find on Debian/Ubuntu (create symlink)
if [ "$PACKAGE_MANAGER" == "apt" ] && command -v fdfind &>/dev/null && ! command -v fd &>/dev/null; then
if dpkg-query -W -f='${Status}' "fd-find" 2>/dev/null | grep -q "ok installed"; then
echo "Creating symlink for fd from fdfind..."
sudo ln -sf /usr/bin/fdfind /usr/local/bin/fd # or ~/.local/bin/fd if preferred
fi # Ensure this line is just 'fi' (and optional comment)
fi
echo "Installing Flatpak Applications..."
if command -v flatpak &> /dev/null; then
for flatpak_name in "${FLATPAK_LIST[@]}"; do
if ! flatpak list --app | grep -q "$flatpak_name"; then
echo "Installing Flatpak $flatpak_name..."
flatpak install flathub "$flatpak_name" -y
echo "$flatpak_name has been installed."
else
echo "Flatpak $flatpak_name already installed."
fi
done
else
echo "WARNING: flatpak command not found. Skipping Flatpak app installation."
fi
echo "--- Package Installation Finished ---"

108
scripts/02-dev-tools-setup.sh Executable file
View file

@ -0,0 +1,108 @@
#!/bin/bash
# 02-dev-tools-setup.sh
# Installs various development tools and utilities.
echo "--- Starting Development Tools Setup ---"
# Setup NVIM
echo "Setting up Neovim..."
if command -v nvim &>/dev/null && [[ "$(nvim --version | head -n 1)" == "NVIM"* ]]; then
echo "Neovim appears to be installed. Checking version/source or skipping."
# Add logic here if you want to ensure it's your /opt/nvim version
else
echo "Downloading and installing Neovim to /opt/nvim..."
TEMP_NVIM_DIR=$(mktemp -d)
curl -Lo "${TEMP_NVIM_DIR}/nvim-linux64.tar.gz" https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz
sudo rm -rf /opt/nvim
sudo tar -C /opt -xzf "${TEMP_NVIM_DIR}/nvim-linux64.tar.gz"
rm -rf "${TEMP_NVIM_DIR}" # Clean up
echo "Neovim installed to /opt/nvim. Add /opt/nvim-linux64/bin to your PATH."
# Consider adding to PATH via a profile script if not handled by zshrc/bashrc symlinks
if [ ! -f /usr/local/bin/nvim ] && [ -d /opt/nvim-linux64/bin ]; then
sudo ln -sf /opt/nvim-linux64/bin/nvim /usr/local/bin/nvim
echo "Symlinked nvim to /usr/local/bin/nvim"
fi
fi
# pynvim
echo "Installing pynvim for Neovim Python support..."
if /usr/bin/python3 -m pip show pynvim &>/dev/null; then
echo "pynvim already installed."
else
/usr/bin/python3 -m pip install --user pynvim
echo "pynvim installed for the current user."
fi
# Install Nerd Font (Hack)
echo "Installing Hack Nerd Font..."
NERDFONT_VERSION="v3.2.1" # Or use "latest" if API allows, else check manually
NERDFONT_NAME="Hack"
FONT_DIR="$HOME/.local/share/fonts"
mkdir -p "$FONT_DIR"
# Check if a Hack Nerd Font is already installed to avoid re-downloading
if fc-list | grep -qi "Hack Nerd Font"; then
echo "Hack Nerd Font already installed."
else
echo "Downloading and installing Hack Nerd Font..."
TEMP_FONT_DIR=$(mktemp -d)
wget -qO "${TEMP_FONT_DIR}/${NERDFONT_NAME}.zip" "https://github.com/ryanoasis/nerd-fonts/releases/download/${NERDFONT_VERSION}/${NERDFONT_NAME}.zip"
if [ $? -eq 0 ]; then
unzip -q "${TEMP_FONT_DIR}/${NERDFONT_NAME}.zip" -d "${TEMP_FONT_DIR}/${NERDFONT_NAME}NerdFont"
# Copy only .ttf or .otf files
find "${TEMP_FONT_DIR}/${NERDFONT_NAME}NerdFont" \( -name "*.ttf" -o -name "*.otf" \) -exec cp {} "$FONT_DIR/" \;
echo "Updating font cache..."
fc-cache -f -v
echo "Hack Nerd Font installed."
else
echo "ERROR: Failed to download Hack Nerd Font."
fi
rm -rf "${TEMP_FONT_DIR}" # Clean up
fi
# Installing OhMyZSH
echo "Installing OhMyZSH..."
if [ -d "$HOME/.oh-my-zsh" ]; then
echo "OhMyZSH already installed."
else
echo "Attempting to install OhMyZSH. It might prompt to change your default shell."
# CHSH=no RUNZSH=no prevents the script from trying to change shell and exit
# The --unattended flag attempts a non-interactive install
if sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended; then
echo "OhMyZSH installation script finished."
echo "If ZSH is not your default shell, change it manually: chsh -s \$(which zsh)"
echo "Then, start a new ZSH session."
else
echo "ERROR: OhMyZSH installation failed."
fi
fi
# Install Rust Up
echo "Installing Rust via rustup..."
if command -v rustc &>/dev/null; then
echo "Rust (rustc) already installed."
else
# The -y flag automates the installation, --no-modify-path prevents it from altering .profile/.bashrc directly
# You'll need to source "$HOME/.cargo/env" or add it to your shell's config manually
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path
echo "Rust installed via rustup. Source \"\$HOME/.cargo/env\" or add it to your shell config."
echo "For the current session, you can run: source \"\$HOME/.cargo/env\""
fi
# Setup Starship
echo "Installing Starship prompt..."
if command -v starship &>/dev/null; then
echo "Starship already installed."
else
# The -y flag attempts a non-interactive install
if curl -sS https://starship.rs/install.sh | sh -s -- -y; then
echo "Starship installed. Add 'eval \"\$(starship init zsh)\"' (or bash/fish) to your shell config."
else
echo "ERROR: Starship installation failed."
fi
fi
echo "--- Development Tools Setup Finished ---"

248
scripts/03-fedora-dotnet-setup.sh Executable file
View file

@ -0,0 +1,248 @@
#!/bin/bash
# 03-fedora-dotnet-setup.sh
# Sets up .NET Development Environment specifically for Fedora.
# Assumes it's being run on Fedora and dnf is available.
echo "--- Starting Fedora .NET Development Environment Setup ---"
# Detect current Fedora version
CURRENT_FEDORA_VERSION=$(rpm -E %fedora)
echo "Detected Fedora version: $CURRENT_FEDORA_VERSION"
echo ""
echo "############################################################"
echo "# Fedora Specific: .NET Development Environment Setup #"
echo "# #"
echo "# Using Fedora version: $CURRENT_FEDORA_VERSION #"
echo "# If this is a future/unsupported version, some packages #"
echo "# or repositories might not be available yet. #"
echo "############################################################"
echo ""
FEDORA_DOTNET_PACKAGES=(
"postgresql-server"
"postgresql-contrib"
"moby-engine" # Docker Engine on Fedora
"docker-compose" # Note: might be 'podman-compose' on newer Fedora
)
echo "Installing Fedora-specific packages for .NET development..."
for pkg_name in "${FEDORA_DOTNET_PACKAGES[@]}"; do
if ! rpm -q "$pkg_name" &>/dev/null; then
echo "Installing $pkg_name..."
if sudo dnf install -y "$pkg_name"; then
echo "$pkg_name has been installed."
else
echo "WARNING: Failed to install $pkg_name. It may not be available in the repositories."
# Special handling for docker-compose
if [ "$pkg_name" == "docker-compose" ]; then
echo "Trying alternative: podman-compose..."
if sudo dnf install -y podman-compose; then
echo "podman-compose installed as alternative to docker-compose."
else
echo "Neither docker-compose nor podman-compose could be installed."
fi
fi
fi
else
echo "$pkg_name is already installed."
fi
done
echo ""
echo "--------------------------------------------------"
echo "I. Core .NET Development Environment"
echo "--------------------------------------------------"
echo "Registering Microsoft Package Repository..."
MS_REPO_URL_BASE="https://packages.microsoft.com/config/fedora"
FEDORA_VERSION_FOR_MS_REPO="$CURRENT_FEDORA_VERSION"
MS_REPO_RPM_URL="${MS_REPO_URL_BASE}/${FEDORA_VERSION_FOR_MS_REPO}/packages-microsoft-prod.rpm"
MS_GPG_KEY_URL="https://packages.microsoft.com/keys/microsoft.asc"
TEMP_MS_RPM_DIR=$(mktemp -d)
TEMP_MS_RPM_PATH="${TEMP_MS_RPM_DIR}/packages-microsoft-prod-temp.rpm"
if ! sudo dnf repolist enabled | grep -q "packages-microsoft-com-prod"; then
echo "Importing Microsoft GPG key: $MS_GPG_KEY_URL"
if sudo rpm --import "$MS_GPG_KEY_URL"; then
echo "Microsoft GPG key imported successfully."
else
echo "WARNING: Failed to import Microsoft GPG key."
fi
echo "Downloading Microsoft package repository for Fedora $FEDORA_VERSION_FOR_MS_REPO: $MS_REPO_RPM_URL"
if wget --quiet "$MS_REPO_RPM_URL" -O "$TEMP_MS_RPM_PATH"; then
echo "Installing downloaded repository configuration..."
if sudo dnf install -y "$TEMP_MS_RPM_PATH"; then
echo "Microsoft repository RPM installed."
else
echo "ERROR: Failed to install Microsoft repository RPM."
fi
else
echo "ERROR: Failed to download Microsoft repository RPM from $MS_REPO_RPM_URL."
echo "This might be because Microsoft doesn't yet support Fedora $FEDORA_VERSION_FOR_MS_REPO."
echo "You can try using a previous Fedora version number or install .NET manually."
# Fallback: try with previous Fedora version
FALLBACK_VERSION=$((CURRENT_FEDORA_VERSION - 1))
echo "Trying fallback with Fedora $FALLBACK_VERSION..."
FALLBACK_URL="${MS_REPO_URL_BASE}/${FALLBACK_VERSION}/packages-microsoft-prod.rpm"
if wget --quiet "$FALLBACK_URL" -O "$TEMP_MS_RPM_PATH"; then
echo "Fallback download successful. Installing..."
sudo dnf install -y "$TEMP_MS_RPM_PATH"
else
echo "Fallback also failed. Skipping Microsoft repository setup."
fi
fi
sudo rm -rf "$TEMP_MS_RPM_DIR" # Clean up
else
echo "Microsoft package repository already configured."
fi
echo "Installing .NET SDK..."
# Try different .NET SDK package names
DOTNET_SDK_PACKAGES=("dotnet-sdk-8.0" "dotnet-sdk-9.0" "dotnet")
DOTNET_INSTALLED=false
for sdk_package in "${DOTNET_SDK_PACKAGES[@]}"; do
if rpm -q "$sdk_package" &>/dev/null; then
echo ".NET SDK ($sdk_package) already installed."
DOTNET_INSTALLED=true
break
fi
done
if [ "$DOTNET_INSTALLED" = false ]; then
for sdk_package in "${DOTNET_SDK_PACKAGES[@]}"; do
echo "Attempting to install $sdk_package..."
if sudo dnf install -y "$sdk_package"; then
echo ".NET SDK ($sdk_package) installed successfully."
DOTNET_INSTALLED=true
break
else
echo "Failed to install $sdk_package, trying next option..."
fi
done
if [ "$DOTNET_INSTALLED" = false ]; then
echo "ERROR: Failed to install any .NET SDK package."
echo "You may need to install .NET manually from https://dotnet.microsoft.com/"
fi
fi
echo "To verify .NET Installation, run these commands manually:"
echo " dotnet --version"
echo " dotnet --list-sdks"
echo " dotnet --list-runtimes"
echo ""
echo "--------------------------------------------------"
echo "II. Code Editor/IDE (Visual Studio Code)"
echo "--------------------------------------------------"
echo "Visual Studio Code (package 'code') should have been installed."
echo "Open VS Code and install these essential extensions from the Extensions view (Ctrl+Shift+X):"
echo " - C# Dev Kit (Publisher: Microsoft)"
echo " - (Optional but Recommended) NuGet Package Manager GUI"
echo " - (Optional but Recommended) GitLens"
echo " - (Optional but Recommended) Prettier - Code formatter"
echo " - (Optional) Any Blazor-specific snippet or tooling extensions"
echo "Restart VS Code if prompted after extension installations."
echo ""
echo "--------------------------------------------------"
echo "III. Version Control (Git)"
echo "--------------------------------------------------"
echo "Git (package 'git') should have been installed by 01-package-install.sh."
echo "Configure Git with your details by running these commands:"
echo " git config --global user.name \"Your Name\""
echo " git config --global user.email \"youremail@example.com\""
echo ""
echo "--------------------------------------------------"
echo "IV. Web Browser for Frontend Testing"
echo "--------------------------------------------------"
echo "Ensure you have a modern web browser (e.g., Firefox, usually pre-installed on Fedora)."
echo "If needed, you can install Chromium with: sudo dnf install -y chromium"
echo "Familiarize yourself with its Developer Tools (Inspector, Console, Network)."
echo ""
echo "--------------------------------------------------"
echo "V. Database (Optional - PostgreSQL Example)"
echo "--------------------------------------------------"
echo "PostgreSQL server and contrib packages should have been installed."
if command -v postgresql-setup &>/dev/null; then
echo "Initializing PostgreSQL Database Cluster (if not already done)..."
# Fixed the postgresql-setup command
if sudo postgresql-setup --initdb; then
echo "PostgreSQL database cluster initialized."
else
echo "PostgreSQL initialization failed or was already done."
fi
else
echo "WARNING: postgresql-setup command not found. Manual initialization might be needed."
fi
echo "Enabling and Starting PostgreSQL Service..."
if sudo systemctl enable --now postgresql; then
echo "PostgreSQL service enabled and started."
else
echo "WARNING: Failed to enable/start PostgreSQL service."
fi
echo "To create a PostgreSQL User and Database, run the following commands:"
echo " 1. Access psql: sudo -u postgres psql"
echo " 2. Inside psql, execute (replace placeholders):"
echo " CREATE USER myappuser WITH PASSWORD 'yoursecurepassword';"
echo " CREATE DATABASE myappdb OWNER myappuser;"
echo " 3. Exit psql: \\q"
echo "(Optional) Install a PostgreSQL GUI Tool like pgAdmin 4:"
echo " sudo dnf install -y pgadmin4"
echo "Or DBeaver (download from their website or check Fedora repos/Flathub)."
echo ""
echo "--------------------------------------------------"
echo "VI. Containerization (Optional but Recommended - Docker)"
echo "--------------------------------------------------"
echo "Docker Engine (moby-engine) and Docker Compose should have been installed."
echo "Enabling and Starting Docker Service..."
if sudo systemctl enable --now docker; then
echo "Docker service enabled and started."
else
echo "WARNING: Failed to enable/start Docker service."
fi
echo "Adding current user ($USER) to the Docker group..."
if sudo usermod -aG docker "$USER"; then
echo "User added to docker group successfully."
else
echo "WARNING: Failed to add user to docker group."
fi
echo "IMPORTANT: You MUST log out and log back in for this group change to take effect."
echo "After logging back in, verify Docker Installation by running:"
echo " docker --version"
echo " docker-compose --version (or podman-compose --version)"
echo " docker run hello-world"
echo ""
echo "--------------------------------------------------"
echo "VII. Final Checks for .NET Setup"
echo "--------------------------------------------------"
echo "Consider rebooting your system to ensure all services and paths are correctly initialized: sudo reboot"
echo "After setup (and potential relogin for Docker), create a Test .NET Project:"
echo " mkdir -p ~/dotnet_test_projects && cd ~/dotnet_test_projects"
echo " dotnet new webapi -o TestApi"
echo " cd TestApi"
echo " dotnet run # (and check in browser at http://localhost:5000 or https://localhost:5001)"
echo " cd .."
echo " dotnet new blazorserver -o TestBlazorApp # or blazorwasm"
echo " cd TestBlazorApp"
echo " dotnet run # (and check in browser)"
echo ""
echo "############################################################"
echo "# End of Fedora Specific .NET Setup #"
echo "############################################################"
echo "--- Fedora .NET Development Environment Setup Finished ---"

51
scripts/04-config-symlinks.sh Executable file
View file

@ -0,0 +1,51 @@
#!/bin/bash
# 04-config-symlinks.sh
# Copies Starship config and symlinks dotfiles.
# Relies on SCRIPT_ROOT_DIR being set by the caller.
echo "--- Starting Configuration and Symlinking ---"
if [ -z "$SCRIPT_ROOT_DIR" ]; then
echo "ERROR: SCRIPT_ROOT_DIR must be set in the environment."
exit 1
fi
# Starship Config File
STARSHIP_CONFIG_SOURCE="${SCRIPT_ROOT_DIR}/terminal/starship.toml"
STARSHIP_CONFIG_DEST_DIR="$HOME/.config"
STARSHIP_CONFIG_DEST_FILE="${STARSHIP_CONFIG_DEST_DIR}/starship.toml"
echo "Setting up Starship configuration..."
if [ -f "$STARSHIP_CONFIG_SOURCE" ]; then
mkdir -p "$STARSHIP_CONFIG_DEST_DIR"
cp "$STARSHIP_CONFIG_SOURCE" "$STARSHIP_CONFIG_DEST_FILE"
echo "Copied starship.toml to $STARSHIP_CONFIG_DEST_FILE"
else
echo "WARNING: Starship config source not found: $STARSHIP_CONFIG_SOURCE. Skipping copy."
fi
# Symlink files (keeping the original simple approach)
echo "Symlinking dotfiles..."
FILES=('vimrc' 'vim' 'zshrc' 'zsh' 'agignore' 'gitconfig' 'gitignore' 'commit-conventions.txt' 'aliases.zsh')
for file in "${FILES[@]}"; do
echo ""
echo "Symlinking $file to $HOME"
# Check if source file exists first
if [ -e "${SCRIPT_ROOT_DIR}/${file}" ]; then
ln -sf "${SCRIPT_ROOT_DIR}/${file}" "$HOME/.$file"
if [ $? -eq 0 ]; then
echo "${SCRIPT_ROOT_DIR}/${file} ~> $HOME/.$file"
else
echo "Install failed to symlink $file."
exit 1
fi
else
echo "WARNING: Source file not found: ${SCRIPT_ROOT_DIR}/${file}. Skipping."
fi
done
echo "--- Configuration and Symlinking Finished ---"

2
steam/steam_dev.cfg Normal file
View file

@ -0,0 +1,2 @@
@nClientDownloadEnableHTTP2PlatformLinux 0
@fDownloadRateImprovementToAddAnotherConnection 1.0

105
temp_dotnet_checklist.md Normal file
View file

@ -0,0 +1,105 @@
**Fedora 42 DotNet Setup Checklist**
**Important Preliminary Note:**
* [ ] **Fedora 42 Specifics:** Since Fedora 42 is a future release, always double-check the *exact* package names and commands against the official Fedora and Microsoft documentation once Fedora 42 is available. The commands below are based on current Fedora practices.
---
**I. Core .NET Development Environment**
* [ ] **Register Microsoft Package Repository:**
* [ ] Import Microsoft GPG key (e.g., `sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc`).
* [ ] Add Microsoft package repository for Fedora 42 (e.g., `sudo wget https://packages.microsoft.com/config/fedora/42/packages-microsoft-prod.rpm -O packages-microsoft-prod.rpm` - *verify exact URL for F42*).
* [ ] Install the downloaded repository configuration (e.g., `sudo dnf install -y packages-microsoft-prod.rpm`).
* [ ] Clean up downloaded .rpm file (e.g., `rm packages-microsoft-prod.rpm`).
* [ ] **Install .NET SDK:**
* [ ] Install the desired .NET SDK version (e.g., `sudo dnf install -y dotnet-sdk-8.0` or latest LTS).
* [ ] **Verify .NET Installation:**
* [ ] Check SDK version: `dotnet --version`
* [ ] List installed SDKs: `dotnet --list-sdks`
* [ ] List installed runtimes: `dotnet --list-runtimes`
---
**II. Code Editor/IDE (Visual Studio Code Recommended)**
* [ ] **Install Visual Studio Code:**
* [ ] Option A: From Fedora repositories (e.g., `sudo dnf install -y code`).
* [ ] Option B: Download `.rpm` from [code.visualstudio.com](https://code.visualstudio.com/) and install (e.g., `sudo dnf install -y ./<vscode_downloaded_file>.rpm`).
* [ ] **Install Essential VS Code Extensions (Open VS Code to do this):**
* [ ] **C# Dev Kit** (from Microsoft - this is key and bundles other C# tools).
* [ ] (Optional but Recommended) NuGet Package Manager GUI.
* [ ] (Optional but Recommended) GitLens.
* [ ] (Optional but Recommended) Prettier - Code formatter.
* [ ] (Optional) Any Blazor-specific snippet or tooling extensions you find useful.
* [ ] *Restart VS Code if prompted after extension installations.*
---
**III. Version Control**
* [ ] **Install Git:**
* [ ] `sudo dnf install -y git`
* [ ] **Configure Git (Global Settings):**
* [ ] Set user name: `git config --global user.name "Your Name"`
* [ ] Set user email: `git config --global user.email "youremail@example.com"`
---
**IV. Web Browser for Frontend Testing**
* [ ] **Install/Verify Modern Web Browser:**
* [ ] Firefox (usually pre-installed on Fedora).
* [ ] Or, install another like Chromium (e.g., `sudo dnf install -y chromium`) or Google Chrome.
* [ ] *Familiarize yourself with its Developer Tools (Inspector, Console, Network).*
---
**V. Database (Optional - PostgreSQL Example)**
* [ ] **Install PostgreSQL Server & Contrib Packages:**
* [ ] `sudo dnf install -y postgresql-server postgresql-contrib`
* [ ] **Initialize PostgreSQL Database Cluster:**
* [ ] `sudo postgresql-setup --initdb`
* [ ] **Enable and Start PostgreSQL Service:**
* [ ] `sudo systemctl enable --now postgresql`
* [ ] **Create PostgreSQL User and Database (via `psql`):**
* [ ] Access `psql`: `sudo -u postgres psql`
* [ ] Create user: `CREATE USER myappuser WITH PASSWORD 'yoursecurepassword';` (Replace with your details)
* [ ] Create database: `CREATE DATABASE myappdb OWNER myappuser;` (Replace with your details)
* [ ] Exit `psql`: `\q`
* [ ] **(Optional) Install PostgreSQL GUI Tool:**
* [ ] e.g., pgAdmin 4: `sudo dnf install -y pgadmin4`
* [ ] Or DBeaver (download from their website or check Fedora repos).
---
**VI. Containerization (Optional but Recommended)**
* [ ] **Install Docker Engine (moby-engine on Fedora):**
* [ ] `sudo dnf install -y moby-engine`
* [ ] **Enable and Start Docker Service:**
* [ ] `sudo systemctl enable --now docker`
* [ ] **Add User to Docker Group:**
* [ ] `sudo usermod -aG docker $USER`
* [ ] **IMPORTANT: Log out and log back in for this group change to take effect.**
* [ ] **Install Docker Compose:**
* [ ] `sudo dnf install -y docker-compose` (or check official Docker docs for other methods if needed).
* [ ] **Verify Docker Installation:**
* [ ] `docker --version`
* [ ] `docker-compose --version`
* [ ] `docker run hello-world` (after logging back in)
---
**VII. Final Checks**
* [ ] **Reboot (Optional but can ensure all services/paths are correctly initialized):**
* [ ] `sudo reboot`
* [ ] **Create a Test Project:**
* [ ] `dotnet new webapi -o TestApi`
* [ ] `cd TestApi`
* [ ] `dotnet run` (and check in browser)
* [ ] `dotnet new blazorserver -o TestBlazorApp` (or `blazorwasm`)
* [ ] `cd TestBlazorApp`
* [ ] `dotnet run` (and check in browser)

877
terminal/nushell/config.nu Normal file
View file

@ -0,0 +1,877 @@
# Nushell Config File
#
# version = "0.92.2"
# For more information on defining custom themes, see
# https://www.nushell.sh/book/coloring_and_theming.html
# And here is the theme collection
# https://github.com/nushell/nu_scripts/tree/main/themes
let dark_theme = {
# color for nushell primitives
separator: white
leading_trailing_space_bg: { attr: n } # no fg, no bg, attr none effectively turns this off
header: green_bold
empty: blue
# Closures can be used to choose colors for specific values.
# The value (in this case, a bool) is piped into the closure.
# eg) {|| if $in { 'light_cyan' } else { 'light_gray' } }
bool: light_cyan
int: white
filesize: cyan
duration: white
date: purple
range: white
float: white
string: white
nothing: white
binary: white
cell-path: white
row_index: green_bold
record: white
list: white
block: white
hints: dark_gray
search_result: { bg: red fg: white }
shape_and: purple_bold
shape_binary: purple_bold
shape_block: blue_bold
shape_bool: light_cyan
shape_closure: green_bold
shape_custom: green
shape_datetime: cyan_bold
shape_directory: cyan
shape_external: cyan
shape_externalarg: green_bold
shape_external_resolved: light_yellow_bold
shape_filepath: cyan
shape_flag: blue_bold
shape_float: purple_bold
# shapes are used to change the cli syntax highlighting
shape_garbage: { fg: white bg: red attr: b}
shape_globpattern: cyan_bold
shape_int: purple_bold
shape_internalcall: cyan_bold
shape_keyword: cyan_bold
shape_list: cyan_bold
shape_literal: blue
shape_match_pattern: green
shape_matching_brackets: { attr: u }
shape_nothing: light_cyan
shape_operator: yellow
shape_or: purple_bold
shape_pipe: purple_bold
shape_range: yellow_bold
shape_record: cyan_bold
shape_redirection: purple_bold
shape_signature: green_bold
shape_string: green
shape_string_interpolation: cyan_bold
shape_table: blue_bold
shape_variable: purple
shape_vardecl: purple
}
let light_theme = {
# color for nushell primitives
separator: dark_gray
leading_trailing_space_bg: { attr: n } # no fg, no bg, attr none effectively turns this off
header: green_bold
empty: blue
# Closures can be used to choose colors for specific values.
# The value (in this case, a bool) is piped into the closure.
# eg) {|| if $in { 'dark_cyan' } else { 'dark_gray' } }
bool: dark_cyan
int: dark_gray
filesize: cyan_bold
duration: dark_gray
date: purple
range: dark_gray
float: dark_gray
string: dark_gray
nothing: dark_gray
binary: dark_gray
cell-path: dark_gray
row_index: green_bold
record: dark_gray
list: dark_gray
block: dark_gray
hints: dark_gray
search_result: { fg: white bg: red }
shape_and: purple_bold
shape_binary: purple_bold
shape_block: blue_bold
shape_bool: light_cyan
shape_closure: green_bold
shape_custom: green
shape_datetime: cyan_bold
shape_directory: cyan
shape_external: cyan
shape_externalarg: green_bold
shape_external_resolved: light_purple_bold
shape_filepath: cyan
shape_flag: blue_bold
shape_float: purple_bold
# shapes are used to change the cli syntax highlighting
shape_garbage: { fg: white bg: red attr: b}
shape_globpattern: cyan_bold
shape_int: purple_bold
shape_internalcall: cyan_bold
shape_keyword: cyan_bold
shape_list: cyan_bold
shape_literal: blue
shape_match_pattern: green
shape_matching_brackets: { attr: u }
shape_nothing: light_cyan
shape_operator: yellow
shape_or: purple_bold
shape_pipe: purple_bold
shape_range: yellow_bold
shape_record: cyan_bold
shape_redirection: purple_bold
shape_signature: green_bold
shape_string: green
shape_string_interpolation: cyan_bold
shape_table: blue_bold
shape_variable: purple
shape_vardecl: purple
}
# External completer example
# let carapace_completer = {|spans|
# carapace $spans.0 nushell ...$spans | from json
# }
# The default config record. This is where much of your global configuration is setup.
$env.config = {
show_banner: false # true or false to enable or disable the welcome banner at startup
ls: {
use_ls_colors: true # use the LS_COLORS environment variable to colorize output
clickable_links: true # enable or disable clickable links. Your terminal has to support links.
}
rm: {
always_trash: false # always act as if -t was given. Can be overridden with -p
}
table: {
mode: rounded # basic, compact, compact_double, light, thin, with_love, rounded, reinforced, heavy, none, other
index_mode: always # "always" show indexes, "never" show indexes, "auto" = show indexes when a table has "index" column
show_empty: true # show 'empty list' and 'empty record' placeholders for command output
padding: { left: 1, right: 1 } # a left right padding of each column in a table
trim: {
methodology: wrapping # wrapping or truncating
wrapping_try_keep_words: true # A strategy used by the 'wrapping' methodology
truncating_suffix: "..." # A suffix used by the 'truncating' methodology
}
header_on_separator: false # show header text on separator/border line
# abbreviated_row_count: 10 # limit data rows from top and bottom after reaching a set point
}
error_style: "fancy" # "fancy" or "plain" for screen reader-friendly error messages
# datetime_format determines what a datetime rendered in the shell would look like.
# Behavior without this configuration point will be to "humanize" the datetime display,
# showing something like "a day ago."
datetime_format: {
# normal: '%a, %d %b %Y %H:%M:%S %z' # shows up in displays of variables or other datetime's outside of tables
# table: '%m/%d/%y %I:%M:%S%p' # generally shows up in tabular outputs such as ls. commenting this out will change it to the default human readable datetime format
}
explore: {
status_bar_background: { fg: "#1D1F21", bg: "#C4C9C6" },
command_bar_text: { fg: "#C4C9C6" },
highlight: { fg: "black", bg: "yellow" },
status: {
error: { fg: "white", bg: "red" },
warn: {}
info: {}
},
table: {
split_line: { fg: "#404040" },
selected_cell: { bg: light_blue },
selected_row: {},
selected_column: {},
},
}
history: {
max_size: 100_000 # Session has to be reloaded for this to take effect
sync_on_enter: true # Enable to share history between multiple sessions, else you have to close the session to write history to file
file_format: "plaintext" # "sqlite" or "plaintext"
isolation: false # only available with sqlite file_format. true enables history isolation, false disables it. true will allow the history to be isolated to the current session using up/down arrows. false will allow the history to be shared across all sessions.
}
completions: {
case_sensitive: false # set to true to enable case-sensitive completions
quick: true # set this to false to prevent auto-selecting completions when only one remains
partial: true # set this to false to prevent partial filling of the prompt
algorithm: "prefix" # prefix or fuzzy
external: {
enable: true # set to false to prevent nushell looking into $env.PATH to find more suggestions, `false` recommended for WSL users as this look up may be very slow
max_results: 100 # setting it lower can improve completion performance at the cost of omitting some options
completer: null # check 'carapace_completer' above as an example
}
use_ls_colors: true # set this to true to enable file/path/directory completions using LS_COLORS
}
filesize: {
metric: false # true => KB, MB, GB (ISO standard), false => KiB, MiB, GiB (Windows standard)
format: "auto" # b, kb, kib, mb, mib, gb, gib, tb, tib, pb, pib, eb, eib, auto
}
cursor_shape: {
emacs: line # block, underscore, line, blink_block, blink_underscore, blink_line, inherit to skip setting cursor shape (line is the default)
vi_insert: block # block, underscore, line, blink_block, blink_underscore, blink_line, inherit to skip setting cursor shape (block is the default)
vi_normal: underscore # block, underscore, line, blink_block, blink_underscore, blink_line, inherit to skip setting cursor shape (underscore is the default)
}
color_config: $dark_theme # if you want a more interesting theme, you can replace the empty record with `$dark_theme`, `$light_theme` or another custom record
use_grid_icons: true
footer_mode: "25" # always, never, number_of_rows, auto
float_precision: 2 # the precision for displaying floats in tables
buffer_editor: "" # command that will be used to edit the current line buffer with ctrl+o, if unset fallback to $env.EDITOR and $env.VISUAL
use_ansi_coloring: true
bracketed_paste: true # enable bracketed paste, currently useless on windows
edit_mode: emacs # emacs, vi
shell_integration: false # enables terminal shell integration. Off by default, as some terminals have issues with this.
render_right_prompt_on_last_line: false # true or false to enable or disable right prompt to be rendered on last line of the prompt.
use_kitty_protocol: false # enables keyboard enhancement protocol implemented by kitty console, only if your terminal support this.
highlight_resolved_externals: false # true enables highlighting of external commands in the repl resolved by which.
recursion_limit: 50 # the maximum number of times nushell allows recursion before stopping it
plugins: {} # Per-plugin configuration. See https://www.nushell.sh/contributor-book/plugins.html#configuration.
plugin_gc: {
# Configuration for plugin garbage collection
default: {
enabled: true # true to enable stopping of inactive plugins
stop_after: 10sec # how long to wait after a plugin is inactive to stop it
}
plugins: {
# alternate configuration for specific plugins, by name, for example:
#
# gstat: {
# enabled: false
# }
}
}
hooks: {
pre_prompt: [{ null }] # run before the prompt is shown
pre_execution: [{ null }] # run before the repl input is run
env_change: {
PWD: [{|before, after| null }] # run if the PWD environment is different since the last repl input
}
display_output: "if (term size).columns >= 100 { table -e } else { table }" # run to display the output of a pipeline
command_not_found: { null } # return an error message when a command is not found
}
menus: [
# Configuration for default nushell menus
# Note the lack of source parameter
{
name: completion_menu
only_buffer_difference: false
marker: "| "
type: {
layout: columnar
columns: 4
col_width: 20 # Optional value. If missing all the screen width is used to calculate column width
col_padding: 2
}
style: {
text: green
selected_text: { attr: r }
description_text: yellow
match_text: { attr: u }
selected_match_text: { attr: ur }
}
}
{
name: ide_completion_menu
only_buffer_difference: false
marker: "| "
type: {
layout: ide
min_completion_width: 0,
max_completion_width: 50,
max_completion_height: 10, # will be limited by the available lines in the terminal
padding: 0,
border: true,
cursor_offset: 0,
description_mode: "prefer_right"
min_description_width: 0
max_description_width: 50
max_description_height: 10
description_offset: 1
# If true, the cursor pos will be corrected, so the suggestions match up with the typed text
#
# C:\> str
# str join
# str trim
# str split
correct_cursor_pos: false
}
style: {
text: green
selected_text: { attr: r }
description_text: yellow
match_text: { attr: u }
selected_match_text: { attr: ur }
}
}
{
name: history_menu
only_buffer_difference: true
marker: "? "
type: {
layout: list
page_size: 10
}
style: {
text: green
selected_text: green_reverse
description_text: yellow
}
}
{
name: help_menu
only_buffer_difference: true
marker: "? "
type: {
layout: description
columns: 4
col_width: 20 # Optional value. If missing all the screen width is used to calculate column width
col_padding: 2
selection_rows: 4
description_rows: 10
}
style: {
text: green
selected_text: green_reverse
description_text: yellow
}
}
]
keybindings: [
{
name: completion_menu
modifier: none
keycode: tab
mode: [emacs vi_normal vi_insert]
event: {
until: [
{ send: menu name: completion_menu }
{ send: menunext }
{ edit: complete }
]
}
}
{
name: ide_completion_menu
modifier: control
keycode: char_n
mode: [emacs vi_normal vi_insert]
event: {
until: [
{ send: menu name: ide_completion_menu }
{ send: menunext }
{ edit: complete }
]
}
}
{
name: history_menu
modifier: control
keycode: char_r
mode: [emacs, vi_insert, vi_normal]
event: { send: menu name: history_menu }
}
{
name: help_menu
modifier: none
keycode: f1
mode: [emacs, vi_insert, vi_normal]
event: { send: menu name: help_menu }
}
{
name: completion_previous_menu
modifier: shift
keycode: backtab
mode: [emacs, vi_normal, vi_insert]
event: { send: menuprevious }
}
{
name: next_page_menu
modifier: control
keycode: char_x
mode: emacs
event: { send: menupagenext }
}
{
name: undo_or_previous_page_menu
modifier: control
keycode: char_z
mode: emacs
event: {
until: [
{ send: menupageprevious }
{ edit: undo }
]
}
}
{
name: escape
modifier: none
keycode: escape
mode: [emacs, vi_normal, vi_insert]
event: { send: esc } # NOTE: does not appear to work
}
{
name: cancel_command
modifier: control
keycode: char_c
mode: [emacs, vi_normal, vi_insert]
event: { send: ctrlc }
}
{
name: quit_shell
modifier: control
keycode: char_d
mode: [emacs, vi_normal, vi_insert]
event: { send: ctrld }
}
{
name: clear_screen
modifier: control
keycode: char_l
mode: [emacs, vi_normal, vi_insert]
event: { send: clearscreen }
}
{
name: search_history
modifier: control
keycode: char_q
mode: [emacs, vi_normal, vi_insert]
event: { send: searchhistory }
}
{
name: open_command_editor
modifier: control
keycode: char_o
mode: [emacs, vi_normal, vi_insert]
event: { send: openeditor }
}
{
name: move_up
modifier: none
keycode: up
mode: [emacs, vi_normal, vi_insert]
event: {
until: [
{ send: menuup }
{ send: up }
]
}
}
{
name: move_down
modifier: none
keycode: down
mode: [emacs, vi_normal, vi_insert]
event: {
until: [
{ send: menudown }
{ send: down }
]
}
}
{
name: move_left
modifier: none
keycode: left
mode: [emacs, vi_normal, vi_insert]
event: {
until: [
{ send: menuleft }
{ send: left }
]
}
}
{
name: move_right_or_take_history_hint
modifier: none
keycode: right
mode: [emacs, vi_normal, vi_insert]
event: {
until: [
{ send: historyhintcomplete }
{ send: menuright }
{ send: right }
]
}
}
{
name: move_one_word_left
modifier: control
keycode: left
mode: [emacs, vi_normal, vi_insert]
event: { edit: movewordleft }
}
{
name: move_one_word_right_or_take_history_hint
modifier: control
keycode: right
mode: [emacs, vi_normal, vi_insert]
event: {
until: [
{ send: historyhintwordcomplete }
{ edit: movewordright }
]
}
}
{
name: move_to_line_start
modifier: none
keycode: home
mode: [emacs, vi_normal, vi_insert]
event: { edit: movetolinestart }
}
{
name: move_to_line_start
modifier: control
keycode: char_a
mode: [emacs, vi_normal, vi_insert]
event: { edit: movetolinestart }
}
{
name: move_to_line_end_or_take_history_hint
modifier: none
keycode: end
mode: [emacs, vi_normal, vi_insert]
event: {
until: [
{ send: historyhintcomplete }
{ edit: movetolineend }
]
}
}
{
name: move_to_line_end_or_take_history_hint
modifier: control
keycode: char_e
mode: [emacs, vi_normal, vi_insert]
event: {
until: [
{ send: historyhintcomplete }
{ edit: movetolineend }
]
}
}
{
name: move_to_line_start
modifier: control
keycode: home
mode: [emacs, vi_normal, vi_insert]
event: { edit: movetolinestart }
}
{
name: move_to_line_end
modifier: control
keycode: end
mode: [emacs, vi_normal, vi_insert]
event: { edit: movetolineend }
}
{
name: move_up
modifier: control
keycode: char_p
mode: [emacs, vi_normal, vi_insert]
event: {
until: [
{ send: menuup }
{ send: up }
]
}
}
{
name: move_down
modifier: control
keycode: char_t
mode: [emacs, vi_normal, vi_insert]
event: {
until: [
{ send: menudown }
{ send: down }
]
}
}
{
name: delete_one_character_backward
modifier: none
keycode: backspace
mode: [emacs, vi_insert]
event: { edit: backspace }
}
{
name: delete_one_word_backward
modifier: control
keycode: backspace
mode: [emacs, vi_insert]
event: { edit: backspaceword }
}
{
name: delete_one_character_forward
modifier: none
keycode: delete
mode: [emacs, vi_insert]
event: { edit: delete }
}
{
name: delete_one_character_forward
modifier: control
keycode: delete
mode: [emacs, vi_insert]
event: { edit: delete }
}
{
name: delete_one_character_backward
modifier: control
keycode: char_h
mode: [emacs, vi_insert]
event: { edit: backspace }
}
{
name: delete_one_word_backward
modifier: control
keycode: char_w
mode: [emacs, vi_insert]
event: { edit: backspaceword }
}
{
name: move_left
modifier: none
keycode: backspace
mode: vi_normal
event: { edit: moveleft }
}
{
name: newline_or_run_command
modifier: none
keycode: enter
mode: emacs
event: { send: enter }
}
{
name: move_left
modifier: control
keycode: char_b
mode: emacs
event: {
until: [
{ send: menuleft }
{ send: left }
]
}
}
{
name: move_right_or_take_history_hint
modifier: control
keycode: char_f
mode: emacs
event: {
until: [
{ send: historyhintcomplete }
{ send: menuright }
{ send: right }
]
}
}
{
name: redo_change
modifier: control
keycode: char_g
mode: emacs
event: { edit: redo }
}
{
name: undo_change
modifier: control
keycode: char_z
mode: emacs
event: { edit: undo }
}
{
name: paste_before
modifier: control
keycode: char_y
mode: emacs
event: { edit: pastecutbufferbefore }
}
{
name: cut_word_left
modifier: control
keycode: char_w
mode: emacs
event: { edit: cutwordleft }
}
{
name: cut_line_to_end
modifier: control
keycode: char_k
mode: emacs
event: { edit: cuttoend }
}
{
name: cut_line_from_start
modifier: control
keycode: char_u
mode: emacs
event: { edit: cutfromstart }
}
{
name: swap_graphemes
modifier: control
keycode: char_t
mode: emacs
event: { edit: swapgraphemes }
}
{
name: move_one_word_left
modifier: alt
keycode: left
mode: emacs
event: { edit: movewordleft }
}
{
name: move_one_word_right_or_take_history_hint
modifier: alt
keycode: right
mode: emacs
event: {
until: [
{ send: historyhintwordcomplete }
{ edit: movewordright }
]
}
}
{
name: move_one_word_left
modifier: alt
keycode: char_b
mode: emacs
event: { edit: movewordleft }
}
{
name: move_one_word_right_or_take_history_hint
modifier: alt
keycode: char_f
mode: emacs
event: {
until: [
{ send: historyhintwordcomplete }
{ edit: movewordright }
]
}
}
{
name: delete_one_word_forward
modifier: alt
keycode: delete
mode: emacs
event: { edit: deleteword }
}
{
name: delete_one_word_backward
modifier: alt
keycode: backspace
mode: emacs
event: { edit: backspaceword }
}
{
name: delete_one_word_backward
modifier: alt
keycode: char_m
mode: emacs
event: { edit: backspaceword }
}
{
name: cut_word_to_right
modifier: alt
keycode: char_d
mode: emacs
event: { edit: cutwordright }
}
{
name: upper_case_word
modifier: alt
keycode: char_u
mode: emacs
event: { edit: uppercaseword }
}
{
name: lower_case_word
modifier: alt
keycode: char_l
mode: emacs
event: { edit: lowercaseword }
}
{
name: capitalize_char
modifier: alt
keycode: char_c
mode: emacs
event: { edit: capitalizechar }
}
# The following bindings with `*system` events require that Nushell has
# been compiled with the `system-clipboard` feature.
# This should be the case for Windows, macOS, and most Linux distributions
# Not available for example on Android (termux)
# If you want to use the system clipboard for visual selection or to
# paste directly, uncomment the respective lines and replace the version
# using the internal clipboard.
{
name: copy_selection
modifier: control_shift
keycode: char_c
mode: emacs
event: { edit: copyselection }
# event: { edit: copyselectionsystem }
}
{
name: cut_selection
modifier: control_shift
keycode: char_x
mode: emacs
event: { edit: cutselection }
# event: { edit: cutselectionsystem }
}
# {
# name: paste_system
# modifier: control_shift
# keycode: char_v
# mode: emacs
# event: { edit: pastesystem }
# }
{
name: select_all
modifier: control_shift
keycode: char_a
mode: emacs
event: { edit: selectall }
}
]
}
# Unix
alias ll = ls -la
alias ln = ln -v
# nvim
alias vim = micro
alias vi = micro
use ~/.cache/starship/init.nu

107
terminal/nushell/env.nu Normal file
View file

@ -0,0 +1,107 @@
# Nushell Environment Config File
#
# version = "0.92.2"
def create_left_prompt [] {
let dir = match (do --ignore-shell-errors { $env.PWD | path relative-to $nu.home-path }) {
null => $env.PWD
'' => '~'
$relative_pwd => ([~ $relative_pwd] | path join)
}
let path_color = (if (is-admin) { ansi red_bold } else { ansi green_bold })
let separator_color = (if (is-admin) { ansi light_red_bold } else { ansi light_green_bold })
let path_segment = $"($path_color)($dir)"
$path_segment | str replace --all (char path_sep) $"($separator_color)(char path_sep)($path_color)"
}
def create_right_prompt [] {
# create a right prompt in magenta with green separators and am/pm underlined
let time_segment = ([
(ansi reset)
(ansi magenta)
(date now | format date '%x %X') # try to respect user's locale
] | str join | str replace --regex --all "([/:])" $"(ansi green)${1}(ansi magenta)" |
str replace --regex --all "([AP]M)" $"(ansi magenta_underline)${1}")
let last_exit_code = if ($env.LAST_EXIT_CODE != 0) {([
(ansi rb)
($env.LAST_EXIT_CODE)
] | str join)
} else { "" }
([$last_exit_code, (char space), $time_segment] | str join)
}
# Use nushell functions to define your right and left prompt
$env.PROMPT_COMMAND = {|| create_left_prompt }
# FIXME: This default is not implemented in rust code as of 2023-09-08.
$env.PROMPT_COMMAND_RIGHT = {|| create_right_prompt }
# The prompt indicators are environmental variables that represent
# the state of the prompt
$env.PROMPT_INDICATOR = {|| "> " }
$env.PROMPT_INDICATOR_VI_INSERT = {|| ": " }
$env.PROMPT_INDICATOR_VI_NORMAL = {|| "> " }
$env.PROMPT_MULTILINE_INDICATOR = {|| "::: " }
# If you want previously entered commands to have a different prompt from the usual one,
# you can uncomment one or more of the following lines.
# This can be useful if you have a 2-line prompt and it's taking up a lot of space
# because every command entered takes up 2 lines instead of 1. You can then uncomment
# the line below so that previously entered commands show with a single `🚀`.
# $env.TRANSIENT_PROMPT_COMMAND = {|| "🚀 " }
# $env.TRANSIENT_PROMPT_INDICATOR = {|| "" }
# $env.TRANSIENT_PROMPT_INDICATOR_VI_INSERT = {|| "" }
# $env.TRANSIENT_PROMPT_INDICATOR_VI_NORMAL = {|| "" }
# $env.TRANSIENT_PROMPT_MULTILINE_INDICATOR = {|| "" }
# $env.TRANSIENT_PROMPT_COMMAND_RIGHT = {|| "" }
# Specifies how environment variables are:
# - converted from a string to a value on Nushell startup (from_string)
# - converted from a value back to a string when running external commands (to_string)
# Note: The conversions happen *after* config.nu is loaded
$env.ENV_CONVERSIONS = {
"PATH": {
from_string: { |s| $s | split row (char esep) | path expand --no-symlink }
to_string: { |v| $v | path expand --no-symlink | str join (char esep) }
}
"Path": {
from_string: { |s| $s | split row (char esep) | path expand --no-symlink }
to_string: { |v| $v | path expand --no-symlink | str join (char esep) }
}
}
# Directories to search for scripts when calling source or use
# The default for this is $nu.default-config-dir/scripts
$env.NU_LIB_DIRS = [
($nu.default-config-dir | path join 'scripts') # add <nushell-config-dir>/scripts
]
# Directories to search for plugin binaries when calling register
# The default for this is $nu.default-config-dir/plugins
$env.NU_PLUGIN_DIRS = [
($nu.default-config-dir | path join 'plugins') # add <nushell-config-dir>/plugins
]
# To add entries to PATH (on Windows you might use Path), you can use the following pattern:
# $env.PATH = ($env.PATH | split row (char esep) | prepend '/some/path')
# An alternate way to add entries to $env.PATH is to use the custom command `path add`
# which is built into the nushell stdlib:
# use std "path add"
# $env.PATH = ($env.PATH | split row (char esep))
# path add /some/path
# path add ($env.CARGO_HOME | path join "bin")
# path add ($env.HOME | path join ".local" "bin")
$env.PATH = (
$env.PATH |
split row (char esep) |
prepend '~/.cargo/bin' |
prepend '/usr/local/bin'
)
# To load from a custom file you can use:
# source ($nu.default-config-dir | path join 'custom.nu')

View file

@ -0,0 +1,168 @@
mkdir ~/.cache/starship
starship init nu | save -f ~/.cache/starship/init.nu
use ~/.cache/starship/init.nu
starship preset gruvbox-rainbow -o ~/.config/starship.toml
use ~/.cache/starship/init.nu
micro ~/.config/starship.toml
zshreload
exit
exit
use ~/.cache/starship/init.nu
micro ~/.config/starship.toml
use ~/.cache/starship/init.nu
]
cat dotfiles/terminal/starship.toml
cat dotfiles/post_install.sh
cp terminal/starship.toml ~/.config/starship.toml<\n>
cat .config/starship.toml
cp dotfiles/terminal/starship.toml ~/.config/starship.toml<\n>
micro ~/.config/starship.toml
micro dotfiles/terminal/starship.toml
git status
cd dotfiles/
git status
git add .
git commit -m "(feat): Changed to Tux from Fedora Logo"
gp
git push
ls
cd ..
git clone http://172.16.5.30:3000/blake/debian-scripts.git
cd debian-scripts/
ls
./install-discord.sh
sudo ./install-discord.sh
ls
cat setup-dotfiles.sh
cd
ls
mkdir Data
cd Data/
mkdir 500GB
mkdir {1TB,5TB}
mkdir [1TB,5TB]
;s
ls
rm -r '[1TB,5TB]/'
mkdir -v 1tb 5tb
ls
pwd
ls 500GB/
$nu.config-path
mico ~/.config/nushell/config.nu
micro ~/.config/nushell/config.nu
exit
micro ~/.config/nushell/config.nu
ls
micro ~/.steam/steam/steam_dev.cfg
cd dotfiles/
ls
git checkout -b refresh_somethings
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
cargo check nu
. "$HOME/.cargo/env"
alacritty)
for cargo_name in ${CARGO_LIST[@]}; do
cargo install "$cargo_name"done
cargo install nu
vim test.sh
micro test.sh
chmod +x test.sh
./test.sh
chmod +x test.sh
micro test.sh
chmod +x test.sh
./test.sh
sudo apt install cmake
ls
./test.sh
micro post_install.sh
git add .
git commit -m "(feat): Rewriting install script, removed hack stuff"
gp
git push
ls
git push --set-upstream origin refresh_somethings
cargo
exit
bash
exit
bash
exit
bash
exit
cargo
$CARGO_PATH
echo $CARGO_PATH
echo $CARGO_HOME
config nu
$env.PATH
env.CARGO_HOME
$env.CARGO_HOME
$env.HOME
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
$env.CARGO_HOME
which cargo
which rustc
ls /usr/local/bin/cargo
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
ls
cd .config/nushell/
ls
vim env.nu
micro env.nu
exit
micro /home/blake/.config/nushell/env.nu
exit
micro /home/blake/.config/nushell/env.nu
exit
$HOME
micro /home/blake/.config/nushell/env.nu
config
fonfig env
config env
config nu
env
which nu
which brew
which home
which
which *
micro /home/blake/.config/nushell/env.nu
which *
cargo
exit
bash
exit
cargo
which cargo
cargo
micro /home/blake/.config/nushell/env.nu
cargo
bash
cargo
micro /home/blake/.config/nushell/env.nu
exit
micro /home/blake/.config/nushell/env.nu
exit
cargo
which cargo
micro /home/blake/.config/nushell/env.nu
sudo apt remove rustup
sudo apt remove rust
sudo apt remove rustc
sudo apt remove cargo
rustup default system
sudo apt install rustup
micro /home/blake/.config/nushell/env.nu
exit
cargo
./test.sh
cargo install alacritty
cargo install alacritty --force
cargo
ping 172.16.5.30
ping 172.16.0.43
ping 172.16.5.30
ls
ls .config/

View file

@ -1,6 +1,6 @@
format = """
[](#a3aed2)\
[ ](bg:#a3aed2 fg:#090c0c)\
[ 󰌽 ](bg:#a3aed2 fg:#090c0c)\
[](bg:#769ff0 fg:#a3aed2)\
$directory\
[](fg:#769ff0 bg:#394260)\

1
zshrc
View file

@ -19,6 +19,7 @@ export PATH="$PATH:$HOME/.cabal/bin:/opt/cabal/1.22/bin:/opt/ghc/7.10.3/bin:$HOM
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
export PATH="$PATH:/opt/nvim-linux64/bin"
source $ZSH/oh-my-zsh.sh
source $HOME/dotfiles/aliases.zsh
# source $HOME/.cargo/env