Description
This repository contains the configuration for multiple machines, as well as my home / IDE config (home-manager).
NixOS
sudo nixos-rebuild switch --flake .#lin-va-mbp-personal
NixOS Generators
nix build .#vmwareConfigurations.rke2-node
Home Manager
home-manager switch --flake .#evanreichard@MBP-Personal
NixOS Hosts
Copy Config
rsync -av --exclude='.git' . root@HOST:/etc/nixos
Partition Drives
# Validate Disk
ls -l /dev/disk/by-id
# Partition Disk
# WARNING: This will destroy all data on the disk(s)
sudo nix \
--experimental-features "nix-command flakes" \
run github:nix-community/disko -- \
--mode disko \
--flake /etc/nixos#HOST_CONFIG
Install NixOS
# Install
sudo nixos-install --flake /etc/nixos#HOST_CONFIG
# Reboot
sudo reboot
Copy Config Back to Host
rsync -av --exclude='.git' . root@HOST:/etc/nixos
Rebuild NixOS
sudo nixos-rebuild switch
Nix Home Manager Configuration - macOS
Upgrade
# Update System Channels
sudo nix-channel --add https://nixos.org/channels/nixpkgs-24.11-darwin nixpkgs
sudo nix-channel --update
# Update Home Manager
nix-channel --add https://github.com/nix-community/home-manager/archive/release-24.11.tar.gz home-manager
nix-channel --update
# Link Repo
ln -s /Users/evanreichard/Development/git/personal/nix/home-manager ~/.config/home-manager
# Build Home Manager
home-manager switch
Clean Garbage
NOTE: This will remove previous generations
sudo nix-collect-garbage --delete-old
nix-collect-garbage --delete-old
OS Update
/etc/bashrc
may get overridden. To properly load Nix, prepend the following:
# Nix
if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then
. '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
fi
# End Nix
Description
Languages
Nix
69.3%
Lua
23.1%
CSS
4.2%
Shell
3.4%