nixos-config: system configuration for NixOS
See also nix-home
- Add the channels:
sudo nix-channel --add https://github.com/NixOS/nixos-hardware/archive/master.tar.gz nixos-hardware
sudo nix-channel --update
- Clone this repo
sudo nix-env -i git
cd /mnt/etc/nixos
sudo git clone https://github.com/epage/nixos-config.git
- Setup
/mnt/etc/nixos/configuration.nix
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
./nixos-config/machines/<machine>.nix
];
system.stateVersion = # ...
}
- Post-install
passwd # Since we are using an initialPassword
sudo nix-channel --add https://github.com/NixOS/nixos-hardware/archive/master.tar.gz nixos-hardware
sudo nix-channel --update
cd /etc/nixos/nixos-config
sudo git pull
cd ..
sudo nixos-rebuild switch
machines/
: top-level files.profiles/
: slices of configuration that can be pulled in.hardware/
: Low-level hardware support (on top of the auto-generatedhardware-configuration. nix
)users/
: Potential users for the various machines.
- Based on ghuntley/dotfiles-nixos