Dotfiles
Here lies the dotfiles crafted with much care
Configuration
A glance at what is present in this lair.
Name | What I am using (NixOS) | What I am using (Mac) |
---|---|---|
OS | NixOS | MacOS BigSur |
Terminal Emulator | Kitty | Alacritty |
Shell | ZSH + ohmyzsh, Nu Shell | ZSH + ohmyzsh, Nu Shell |
Font | Hack Nerd Font Mono | Hack Nerd Font Mono |
Editor | Neovim | Neovim |
Desktop Environment | XMonad, Arc-Dark, Polybar, picom, i3lock-fancy, rofi | Whatever comes with Mac |
Browser | Google Chrome | Google Chrome |
User environment manager | Home Manager | Home Manager |
Well these look different from normal dotfiles mate
Ok so I am one of those wackoo people who are all in on the "nix hype train". That is why this might look unfamilier to someone who does not know what nix is.
nix is a philosophy, a programing language, a package manager and an OS. All this culimates in a unique approach to package management and system configuration. The end result is reproducible, declarative and reliable systems.
Think of it like git but for your system, package management, etc :mind_blown:
Color me interested! Where can I know more?
Now if you are still with me maybe you are interested to know more about it. Here are a few helpful links that you can visit to know more about it.
- Watch first 6 minutes of this video to get a gist of nix package management and how it is different from standard package management and then building on that what is NixOS)
- If the previous video peeks your curiosity then I recommend looking at this to get a deeper understanding
- Finally, if you decide that this is something you want for yourself. Then this amazing playlist might just be the perfect place to start.
Note: This distro of Linux is quite different from others, so please do spend some time with it.
Setup
Here is a walkthrough of what are the steps one need to take to get this config or parts of it setup on any system.
User config setup
Requirements
- nix with flake support is available
Steps
- Get contents of this repo onto your system to
~/.dotfiles
cd
into~/.dotfiles
- Execute:
nix run home-manager --no-write-lock-file -- switch --flake "./users#nixos"
Full Setup of NixOS (first time)
Requirements
- Some way to install NixOS
- Ability to connect to the internet
- Boot drive with label
NIXBOOT
- Root drive where the OS will go
NIXROOT
- Swap partition
NIXSWAP
Steps
- Install NixOS
- Make sure you have a way to get this repo.
curl
,git
, etc - Make sure you enable internet
- Make sure you have a way to get this repo.
- Get contents of this repo onto your system to
~/.dotfiles
cd
into~/.dotfiles
- Execute:
sudo nixos-rebuild switch --flake './system#nixos'
- Execute:
nix run home-manager --no-write-lock-file -- switch --flake "./users#nixos"
Code Structure
- The top level folders
system
andusers
are both flakes - After that it is just a matter of following the code really
- In users flake
imports
is where you can see what all will end up in the final setup- for NixOS
- for mac