1.4 KiB
1.4 KiB
NixOS Configs
Reproducible multi-host NixOS + Hyprland ("Silicon Volt") configuration.
Install (new machine)
# Setup disks
nix run --experimental-features "nix-common flakes" github:nix-community/disko -- --mode disko --flake .#hades
# install configs
nixos-install --flake .#hades
# set password
nixos-enter --root /mnt -- passwd anish
Rebuild (existing machine)
rebuild switch # zsh helper: sudo nixos-rebuild switch --flake ~/NixOS-Configs#<host>
Adding a new host (e.g. a laptop)
- Create
hosts/<name>/withdefault.nix,hardware-configuration.nix, and (optionally)disko.nix; import the shared modules (modules/core,modules/graphical,modules/apps). - Register it in
flake.nixundernixosConfigurations. - Declare host-specific displays in
hosts/<name>/default.nix:
home-manager.users.anish.volt.monitors = [
{
output = "eDP-1"; # or "desc:<panel description>"
mode = "2880x1800@120Hz"; # or "preferred"
position = "auto";
scale = 2;
vrr = null; # optional per-monitor VRR
}
{ output = ""; mode = "preferred"; position = "auto"; scale = "auto"; } # fallback
];
The volt.monitors default (any output @ preferred) keeps every machine working
out of the box; hosts override only what they need. Hosts without an NVIDIA GPU
simply don't import modules/hardware/nvidia.nix — all vendor env vars live there.