Configuration for the tools / programs / games / etc. that I use, and for all of my hosts running NixOS.
-
app/
contains configuration files for programs that need special care tostow
-
cfg/
contains configuration files for programs that can be readilystow
ed -
configuration.nix
imports host-specific NixOS configuration and contains config shared between all NixOS hosts -
host/
is a symlink to the active host folder inhosts/
on NixOS systems -
hosts/
contains per-host configuration
I've opted to stow
dotfiles, stored separately from my NixOS config (as
opposed to using home-manager), to maintain compatibility for the non-NixOS
systems that I work from.
Hostnames are compliant with RFC 1178. All hosts take the name of an Avatar (from The Last Airbender) that lived between Aang and Wan, exclusive. The most obvious drawback is that there are only six names in the hostname pool. The less-obvious drawback is that, while still a great show, The Last Airbender is seemingly much more popular now than when I started using this theme. RFC 1178 explicitly advises against worrying about collisions, but I might not have chosen this theme now given its popularity.
That said, at least one such host has been active since I began using this theme some years ago, so for the sake of consistency, it will stay.
I'll update this with actual instructions down the line, but the process generally looks like this.
-
Save the original /etc/nixos for propriety:
sudo mv /etc/nixos ~/nixos.bak
-
Clone this repository to /etc/nixos (chown as needed):
git clone https://github.com:natanlao/dotfiles.git /etc/nixos
-
Activate the right host:
cd /etc/nixos ln -s hosts/$(hostname) host
-
sudo nixos-rebuild switch
-
stow
dotfiles (see below).
-
Clone this repo to ~/.dotfiles:
git clone https://github.com/natanlao/dotfiles.git ~/.dotfiles
-
If there's a host-specific bootstrapping script, run it:
sh hosts/$(hostname)/bootstrap.sh
-
stow
dotfiles (see below).
First, dry run for good luck:
stow -nt ~ cfg
Then fire:
stow -t ~ cfg
I stole this repository structure from barrucadu/nixfiles.