For NixOS (including WSL) and macOS (with nix-darwin)
Powered by Nix and Home Manager
Requirements • Getting Started • License
A comprehensive, cross-platform Nix configuration repository managing system settings and user environments across multiple operating systems. This repository provides reproducible, declarative configurations for NixOS (including NixOS via WSL) and macOS.
Be sure to ⭐️ or fork this repo if you find it useful!
Ensure you have git available when needed in the installation section.
Ensure you have the latest version of NixOS installed.
Either run the graphical installer or manually install NixOS on your system.
Ensure you have the latest version of WSL installed.
Download nixos.wsl from the latest release.
Either open the file by double-clicking or run:
wsl --install --from-file nixos.wsl # wherever nixos.wsl was downloadedAfter the initial installation, update your channels to use nixos-rebuild:
sudo nix-channel --updateIf you want to make NixOS your default distribution, you can do so with
wsl -s NixOSEnsure you have the latest version of macOS and Nix installed.
Install Nix with the Nix Installer from Determinate Systems:
curl -fsSL https://install.determinate.systems/nix | sh -s -- installClone the repository:
git clone https://git.npham.de/Nitestack/nix-config.gitBefore continuing with the installation, initialize the Nix system:
sudo nixos-rebuild boot --flake ~/nix-config#nixstationPlease reboot the system.
Before continuing with the installation, initialize the Nix system:
sudo nix run nix-darwin/master#darwin-rebuild -- switch --flake ~/nix-config#macstationPlease reboot the system.
Initialize the Nix system inside of NixOS-WSL:
sudo nixos-rebuild boot --flake ~/nix-config#wslstationExecute the following commands on Windows to correctly apply the custom username:
wsl -t NixOS
wsl -d NixOS --user root exit
wsl -t NixOSRestart WSL.
This project is licensed under the Apache-2.0 license.
