Install
To install NixOS on any of my devices I use nixos-anywhere.
You will need to be able to SSH to the target machine from where this command will be run. Load nix installer ISO if
no OS on the device. You need to copy ssh keys onto the target machine:
mkdir -p ~/.ssh && curl https://github.com/straffern.keys > ~/.ssh/authorized_keys in my case I can copy them from GitHub.
git clone git@github.com:straffern/.dotfiles.git ~/.dotfiles/
cd ~/.dotfiles
nix develop
nixos-anywhere --flake '.#hostname' nixos@192.168.1.8 # Replace with your IPTo build my config for a specific host you can do something like:
git clone git@github.com:straffern/.dotfiles.git ~/.dotfiles/
cd ~/.dotfiles
# To build system configuration
nh os switch
# To build user configuration
nh home switchImportant
Determinate Nix Migration: If you are switching to this configuration for the first time on a standard NixOS install, use the following flags to enable the Determinate binary cache and avoid building Nix from source:
sudo nixos-rebuild switch --flake .#HOSTNAME \
--option extra-substituters https://install.determinate.systems \
--option extra-trusted-public-keys cache.flakehub.com-3:hJuILl5sVK4iKm86JzgdXW12Y2Hwd5G07qKtHTOcDCM=# Update all flake inputs
nix flake update
# Garbage collect and optimize store
nh clean
# Deploy to remote server (Home Lab) using deploy-rs
sys deploy HOSTNAME # legacy wrapper for deploy-rs
# Build custom ISO
nix build .#nixosConfigurations.graphical.config.system.build.isoImageSome features of my config:
- Snowfall Lib: Structured to allow multiple NixOS configurations, including desktop, laptop and homelab
- Suites Pattern: Composable bundles of functionality for easy machine setup
- Custom namespace: All custom options live under the
asgaardnamespace - Stylix: Consistent theming with Stylix (Catppuccin Macchiato). The generated palette can be viewed at
/etc/stylix/palette.html(NixOS) or~/.config/stylix/palette.html(Home Manager). - Persistence: Opt-in persistence through Impermanence
- Disk Management: Declarative partitioning with Disko
- Secret Management: Encrypted secrets with sops-nix and age
- Environments: Choice of Hyprland or GNOME
- Development: AI-integrated workflows with custom OpenCode shell tools and agents
- Homelab: Managed Kubernetes clusters with k3s and remote deployment via deploy-rs
(Coming soon: updated screenshots)
- nixicle: https://github.com/hmajid2301/nixicle
- Snowfall config: https://github.com/jakehamilton/config
- My original structure: https://github.com/anotherhadi/nixy
- Neovim UI: https://github.com/NvChad/nvchad

