Originally a central place to sync my home environment across machines using shell scripts, this repo now holds my nixos configs for all of my systems.
The default package in this flake is a zsh session with my dev environment loaded through the nix daemon, which works on any distro with the nix daemon installed.
Start by installing nix
curl -fsSL https://install.determinate.systems/nix | sh -s -- install
nix run github:colefuerth/dot-filesSYSTEM="cole-laptop"
sudo echo "sudo acquired" # nom cuts off the sudo prompt, so preauthenticate
sudo nixos-rebuild \
--option extra-substituters https://install.determinate.systems \
--option extra-trusted-public-keys cache.flakehub.com-3:hJuILl5sVK4iKm86JzgdXW12Y2Hwd5G07qKtHTOcDCM= \
--flake github:colefuerth/dot-files#$SYSTEM \
--log-format internal-json -v switch |& nix run nixpkgs#nix-output-monitor -- --jsonSYSTEM="cole-laptop"
nix run nixpkgs#git -- clone https://github.com/colefuerth/dot-files.git
cd dot-files
sudo nixos-rebuild --flake .#$SYSTEM --log-format internal-json -v switch |& nom --jsonSYSTEM="cole-wsl2"
nixos-rebuild --flake .#$SYSTEM --log-format internal-json -v build |& nom --json
# OR (build through the nix daemon on non-nixos systems)
SYSTEM="cole-vm"
nix build --log-format internal-json --verbose .#nixosConfigurations.$SYSTEM.config.system.build.toplevel |& nom --jsonSYSTEM="cole-laptop"
sudo nixos-rebuild --flake .#$SYSTEM testFirst, we must clone the repo:
sudo apt update && sudo apt install -y git
git clone git@github.com:colefuerth/dot-files.gitI recommend configuring before installing; to configure:
cd dot-files
cp config.bash.example config.bash
nano config.bash # the #Configuration section details what each of these options doTo install, then run:
./install.sh| Shell Config | Description |
|---|---|
| AUTO_UPDATE | Whenever a new terminal is opened, run ./update.sh to pull any changes and include them in the session, so you are always on the latest release |
| INSTALL_ZSH | sudo apt install zsh |
| SETUP_ZSH | Install/load this repo to zsh |
| SETUP_BASH | Install/load this repo to bash |
| DEFAULT_SHELL | "zsh" or "bash"; runs chsh with whatever this is set to |
| INSTALL_STARSHIP | install starship prompt |
| DEPLOYMENT_METHOD | "copy" just copies all of the files in this repo to the aliases directory, "softlink" creates symbolic links to the files in this repo |
| Tools Config | Description |
|---|---|
| SETUP_WELCOME_MSG | run neofetch on new terminal sessions |
| INSTALL_TOOLS | If this is false, nothing under the SUBTOOLS_CONFIG is installed. Recommended to leave this as true and just config the subtools |
| SETUP_SSH | Install openssh-server, open the ssh port, generate an rsa key if none are already generated at the default path |
| SETUP_DIALOUT | add the current user to the dialout group, needed to access serial consoles |
| SETUP_GIT | installs git and sets the global user.name and user.email (prompts user for each) |
| INSTALL_CCACHE | install the ccache 4.8.3 binaries from its github releases to /usr/local/bin |
| IS_VM | sudo apt install open-vm-tools (necessary for copy paste and x11 compatibility through most virtual machine managers) |
| SUBTOOL | Description |
|---|---|
| NCDU | NCurses Disk Usage is a TUI tool that recursively checks the du of each folder and is an excellent visual terminal tool for traversing folders |
| INSTALL_7Z | gets the latest 7zz binary from github releases (apt is on the 2016 release, this is the 2023 release), and if 7z is not already installed, aliases 7z to 7zz |
| HTOP | colorful TUI task manager if you care about that stuff (it's pleasing to look at when builds run) |
| RUST | Install rust using the rust.rs script (classic) |
| MCFLY | Context-sensitive, AI-powered search engine for your terminal history (I don't use this personally but it can be useful if you're into that) |
| ADVCPMV | Advanced copy/move mod for cp and mv; there is an alias in this repo acp and amv that enable a progress bar for copies and moves |
| CLIPBOARD | cb clipboard for terminal, files, extremely versatile and useful when you need it, has multiple clipboards so you can juggle things easily |
| PYTHON | install the python binaries from apt |
| PYTHON_EXT | "Python_Extended" installs some of the more "essential" pip packages like numpy and venv |
| MORE_TOOLS | space-separated list of additional apt packages to install |
By default, any shells configured with my tools auto source any files found under the .zsh_aliases or .bash_aliases directory, so you can just make your own file under that directory and add stuff there.