~/.dotfiles 📂
For NixOS and Windows (including WSL)
Powered by chezmoi
Requirements • Getting Started • Credits • License
Elevate your computing experience across platforms with this curated collection of configuration files and setup scripts. From NixOS to Windows and WSL (NixOS), personalize your environment effortlessly. Securely manage diverse machines using chezmoi and leverage seamless deployment and synchronization.
Be sure to ⭐️ or fork this repo if you find it useful!
Ensure you have the latest stable release of NixOS, Windows, or WSL installed.
Ensure you have the latest release of NixOS-WSL downloaded.
Open PowerShell and run:
wsl --import NixOS --version 2 $env:USERPROFILE\NixOS\ nixos-wsl.tar.gz
After the initial installation, update your channels to use nixos-rebuild
:
sudo nix-channel --update
Then rebuild the system:
sudo nixos-rebuild switch
To make NixOS your default distribution, use:
wsl -s NixOS
Ensure you have git
and chezmoi
available when needed in the installation section.
nix-shell -p git chezmoi
Ensure you have git
, chezmoi
, and pwsh
installed.
winget install -e --accept-package-agreements --accept-source-agreements Git.Git twpayne.chezmoi Microsoft.PowerShell
Important
All versions of Windows come with PowerShell 5.1 pre-installed. However, this repository requires PowerShell 7.x or higher. PowerShell 7.x+ does not replace or upgrade PowerShell 5.1; it is installed alongside it.
Clone the dotfiles repository:
git clone https://github.com/Nitestack/dotfiles.git ~/.dotfiles
# or with SSH
git clone git@github.com:Nitestack/dotfiles.git ~/.dotfiles
Before continuing with the installation, initialize the NixOS system:
sudo nixos-rebuild boot --flake "$HOME/.dotfiles/nix#nixstation"
Please reboot the system and then continue with the Final Steps.
Before continuing with the installation, initialize the NixOS WSL system:
sudo nixos-rebuild boot --flake "$HOME/.dotfiles/nix#wslstation"
Execute the following commands in PowerShell to correctly apply the custom username:
wsl -t NixOS
wsl -d NixOS --user root exit
wsl -t NixOS
Start WSL and then continue with the Final Steps.
Initialize chezmoi:
chezmoi init --source="$HOME/.dotfiles" --apply
chezmoi init --source="$env:USERPROFILE\.dotfiles" --apply
- Tom Payne: Creator of chezmoi. Parts of his dotfiles are used.
- Folke Lemaitre: Creator of LazyVim. Parts of his dotfiles are used.
- Aylur: Creator of Ags and Astal. Parts of his Nix configuration were used.
- end-4: Parts of his dotfiles are used.
- Pratik Gayen: Hyprlock config is used.
- Elliott Minns (Dreams of Code): Parts of his Nix configuration were used.
This project is licensed under the Apache-2.0 license.