This repository documents my personal NixOS configurations using Nix Flakes.
Machine | Specification |
---|---|
monix |
Lenovo Yoga Slim 6, Intel Core i7-1260P |
becks |
Development VMWare guest for monix |
Configuration includes support for:
Follow the NixOS Manual to encrypt, partition and format your filesystem. Return to this readme after mounting partitions in the target filesystem (i.e. /mnt/*
).
-
Clone this repository in the target filesystem:
# git clone https://github.com/atreyasha/nix-config.git /mnt/etc/nix-config
-
[Optional] If installing on new hardware, update hardware configuration (eg. partition UUIDs, LUKS devices) in
hosts/<host>/hardware.nix
and commit these changes later. Run the following to inspect detected hardware configuration:# nixos-generate-config --show-hardware-config
-
Install this configuration:
# nixos-install --flake /mnt/etc/nix-config#<host>
-
Update the
root
and default user's password. You can also import secrets now.
After installing NixOS, make changes to this repository as required. To sync changes on the system, execute the following as the default user:
$ pull-and-switch
Install nixfmt
in your system, then initialize pre-commit
hook for automatic checks of Nix files:
$ pre-commit install
nix-starter-configs
for a great starting point to NixOSnixfiles
for an example of complex multi-host configuration