This repository, maintained by henry40408, features configurations managed with Nix Flakes. It is organized into "home-manager" and "hosts" directories for home-manager and NixOS configurations, respectively. The project is based on the template provided by Misterio77's nix-starter-configs and is designed for both WSL and VM environments.
Ensure Nix with Flake support is installed. Clone this repository:
git clone https://github.com/henry40408/nixos-config.git
cd nixos-configTo ensure that the NixOS configuration is evaluable, also known as a dry run:
make os/dry-runTo deploy the NixOS configuration:
(Recommended) Automatically apply the configuration based on the detected environment:
make os/switchFor WSL:
sudo nixos-rebuild switch --flake .#wslFor VM:
Ensure the VM boots with UEFI and has three partitions labeled "boot", "nixos", and "swap". For detailed setup instructions, consult the NixOS Manual.
sudo nixos-rebuild switch --flake .#vmTo ensure that the Home Manager configuration is evaluable, also known as a dry run:
make dry-runTo apply the home-manager configuration:
home-manager switch --flake .#nixos@all
# or
make switchThe "home-manager" directory contains user-level settings, and the "hosts" directory includes system-level configurations for different NixOS hosts. Customize by editing these files. The Flake.nix file orchestrates their integration and management. For more details, please refer to ARCHITECTURE.md
Contributions are welcome. Please review our contributing guidelines for proposing changes.
Licensed under the MIT License.