···11.POSIX:
22-.PHONY: default build test diff update
22+.PHONY: default build test diff update install
3344default: build
55···3636 run 'github:nix-community/disko/latest#disko-install' -- \
3737 --write-efi-boot-entries \
3838 --flake '.#${host}' \
3939- --disk main '${device}'
3939+ --disk main '${disk}'
+48-4
README.md
···11# NixOS Setup
2233+Automatically install and configure NixOS.
44+35## Usage
4655-Open a shell with the build dependencies:
77+### Customize the configuration
88+99+Review all files and adjust the configurations to suit your needs. At a
1010+minimum, you’ll need to change the following:
1111+1212+- Users:
1313+ - Replace `khuedoan` with your username.
1414+ - Replace my SSH public keys with yours.
1515+ - Replace `khuedoan/dotfiles` with your dotfiles repository, or use `home-manager` to manage all dotfiles.
1616+1717+- Hosts:
1818+ - Replace my hostnames with yours.
1919+ - Adjust hardware configurations to match your system.
2020+2121+### Install with the NixOS Live CD
2222+2323+1. Download the latest NixOS live CD from [here](https://nixos.org/download).
2424+2. Create a bootable USB drive:
625726```sh
88-nix-shell -p git neovim
2727+sudo dd bs=4M if=/path/to/nixos.iso of=/dev/sda conv=fsync oflag=direct status=progress
928```
10291111-Clone the repository and build:
3030+3. Boot from the USB drive.
3131+4. Install NixOS from the live CD:
12321333```sh
1414-sudo git clone https://github.com/khuedoan/nixos-setup
3434+nix-shell -p git gnumake neovim
3535+git clone https://github.com/khuedoan/nixos-setup
1536cd nixos-setup
3737+# Remember to replace the placeholders
3838+make install host=HOSTNAME disk=/dev/DISK
3939+```
4040+4141+### Apply changes
4242+4343+After installation, clone your repository again and apply changes to the
4444+configuration by running:
4545+4646+```sh
1647make
1748```
4949+5050+### Update hardware configuration
5151+5252+If hardware changes occur, update the hardware configuration using the command
5353+in the `install` target in `./Makefile`.
5454+5555+## Testing
5656+5757+To test updated configurations without applying them to a running machine, create a VM using:
5858+5959+```sh
6060+make test
6161+```