Skip to content

A unified, declarative dotfiles setup leveraging, Nix, Home Manager, nix-darwin and chezmoi to provide consistent shell environments across NixOS, macOS and Windows (including NixOS via WSL). This repository uses Nushell as the primary shell.

License

Notifications You must be signed in to change notification settings

Nitestack/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unified ~/.dotfiles 📂
For NixOS, macOS (with nix-darwin), Windows (and NixOS WSL)
Powered by Nix, Home Manager, Nushell and chezmoi

Latest commit GitHub Repo stars Github Created At

RequirementsGetting StartedLicense

image

A unified, declarative dotfiles setup leveraging, Nix, Home Manager, nix-darwin and chezmoi to provide consistent shell environments across NixOS, macOS and Windows (including NixOS via WSL). This repository uses Nushell as the primary shell.

Be sure to ⭐️ or fork this repo if you find it useful!

Warning

This repository is primarily intended for NixOS, NixOS WSL and macOS. While I could have included more features on Windows, they may not perform as well as they do on NixOS (WSL). Tools like Neovim and others are technically functional on Windows, but they are slower. As a result, I've excluded them on Windows. If you want to use these tools on Windows, I recommend using NixOS WSL, it's just a better developer experience.

⚙️ Requirements

Ensure you have nu, git and chezmoi available when needed in the installation section.

NixOS

Ensure you have the latest version of NixOS installed.

Either run the graphical installer or manually install NixOS on your system.

WSL (NixOS)

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 downloaded

Post-Install

After the initial installation, update your channels to use nixos-rebuild:

sudo nix-channel --update

If you want to make NixOS your default distribution, you can do so with

wsl -s NixOS

macOS

Ensure you have the latest version of macOS and Nix installed.

Install Nix with the Nix Installer from Determinate Systems:

curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | \
  sh -s -- install

Windows

Ensure you have the latest version of Windows installed.

🏁 Getting Started

Clone the dotfiles repository:

git clone https://github.com/Nitestack/dotfiles.git ~/.dotfiles

NixOS

Before continuing with the installation, initialize the Nix system:

sudo nixos-rebuild boot --flake "$HOME/.dotfiles/nix#nixstation"

Please reboot the system and then continue with the Final Steps.

macOS

Before continuing with the installation, initialize the Nix system:

nix run nix-darwin/master#darwin-rebuild -- switch --flake "$HOME/.dotfiles/nix#macstation"

Please reboot the system and then continue with the Final Steps.

WSL (NixOS)

Initialize the Nix system inside of NixOS-WSL:

sudo nixos-rebuild boot --flake "$HOME/.dotfiles/nix#wslstation"

Execute the following commands on Windows to correctly apply the custom username:

wsl -t NixOS
wsl -d NixOS --user root exit
wsl -t NixOS

Restart WSL and then continue with the Final Steps.

Windows

Continue with the Final Steps.

Final Steps

Initialize chezmoi:

chezmoi init --source=~/.dotfiles --apply

📝 License

This project is licensed under the Apache-2.0 license.

About

A unified, declarative dotfiles setup leveraging, Nix, Home Manager, nix-darwin and chezmoi to provide consistent shell environments across NixOS, macOS and Windows (including NixOS via WSL). This repository uses Nushell as the primary shell.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •