Skip to content

sharpchen/nix-config

Repository files navigation

Nix Config

Prerequisites

Non-NixOS Prerequisites

Common Prerequisites

  1. Enable flakes
sudo sh -c 'echo "experimental-features = nix-command flakes" >> /etc/nix/nix.conf'
  1. Clone repo
nix-shell -p git
mkdir -p ~/.config/home-manager/ && cd ~/.config/home-manager/ && git clone https://github.com/sharpchen/nix-config.git .

Installation

NixOS-WSL

sudo nixos-rebuild switch --flake ~/.config/home-manager#nixos-wsl

Non-NixOS

home-manager switch --flake ~/.config/home-manager#sharpchen

Restore on Windows

Whole machine

powershell -noprofile -f ./install.ps1

Dotfiles only

powershell -noprofile -f ./dotfiles.ps1