Skip to content

PartemImperium/dotfiles

Repository files navigation

Contributors Forks Stargazers Issues


Logo

dotfiles

A single source for all my dotfiles to be applied to my machines.

Table of Contents

  1. About The Project
  2. Getting Started
  3. Test it Out
  4. Making Changes
  5. Screenshots
  6. Acknowledgements

About The Project

A single source for all my dotfiles to be applied to my machines. These will be applied with chezmoi.

Built With

  • nix - package manager
  • home-manager - declaritive framework for nix package manager
  • chezmoi - dotfiles manager
  • zsh - my perfered shell
  • zit - minimal zsh module manager

Other installed tools

  • neoFetch - shows system info with cool ascii art for your distro on login.
  • My aliases - my personal aliases for zsh (should work in bash as well)
  • My functions - my personal functions for zsh. *.zsh gets loaded and compiled.
  • powerline10k - zsh theme

Configurations managed

  • .zshrc
  • .p10k.zsh
  • home.nix
  • .gitconfig
    • Creates either a .home.gitconfig or .work.gitconfig file and imports it allowing you to seperate home or work config (and overal config).

Getting Started

To get a local machine up and running with these dotfiles follow these simple steps.

Prerequisites

The following things will be needed to use theses dotfiles (any other tools will be installed with nix after installation).

  • curl - Used in the oneliner installer.
  • bash - Used in the oneliner installer.
  • xz - Used in the oneliner installer.
  • A installed nerdfont
    • I use the patched Hack font but any of the patched fonts from that repo will work.
    • You will need to set it as the font for your terminal emulator.
    • Nix/Home Manager installs Hack NerdFont but currently that doesnt install to host in WSL.
    • If you dont install (or set as the font in your terminal emulator) a patched nerd font things will function but there will be missing chars in the terminal theme making it look weird.

Installation

This installs chezmoi, nix and home-manager and the dotfiles using this repo and applies them to your user.

bash <( curl https://raw.githubusercontent.com/PartemImperium/dotfiles/master/install.sh)

Note: you can pass a branch into the oneliner installer with the --branch arg. For a normal install I would suggest using master and doing your feature work in a docker container however.

bash <( curl https://raw.githubusercontent.com/PartemImperium/dotfiles/master/install.sh) --branch feature/my-super-awesome-feature

Test it Out

If you want to try out before running it on your machine you can use one of the following docker containers to see what it will do. As soon as you exit out of the container it will stop and all changes will be reverted.

You can use whichever base image you perfer (any base image will do but you will need to go through the process of adding a new user because nix cant be installed as root). You first need to build the image then run it. The below commands will build and then start the docker container in a interactive colorized terminal (and auto installs/updates the needed tools) that self destructs when you exit the container.

If you are making changes to the install.sh or build_and_run.sh then you need to replace master with your feature branch in the curl url.

--branch defaults to master and --distro defaults to ubuntu as such if you want master and ubuntu it is not needed to pass either.

Alpine

bash <( curl https://raw.githubusercontent.com/PartemImperium/dotfiles/master/dockerfiles/build_and_run.sh) --branch feature/my-super-cool-feature --distro alpine

Ubuntu

bash <( curl https://raw.githubusercontent.com/PartemImperium/dotfiles/master/dockerfiles/build_and_run.sh) --branch feature/my-super-cool-feature --distro ubuntu

Making Changes

To make changes I make the changes in a new branch and then run them in a docker container as explained in Test it Out. If you dont want to curl the build_and_run.sh script you can just run the version locally and it wil work.

Once I verify everything works in the docker container merge the branch into master and update on machinces.

chezmoi update

Screenshots

macos

Ubuntu (WSL)

Ubuntu Terminal

In the default terminal when only 8 colors exist (and icon fonts wont work) the theme reacts and still shows all the same data (just a little less flashy). The screenshot was taken in a normal terminal emulator specifying it was the default terminal so neoFetch still shows 16 colors.

Acknowledgements