This repository contains my personal dotfiles, which are tailored to set up my preferred development environment. These configurations simplify the setup process for both Windows and Windows Subsystem for Linux systems, ensuring consistency and efficiency.
Follow these steps to set up your Windows environment:
- Create a bootable USB drive with the Windows installation ISO.
- Place the
autounattended.xml
file located in thewindows/
directory of this repository at the root of the USB drive.
- Disconnect your system from the internet.
- Boot from the USB drive and proceed with the Windows installation.
- The installation process will start automatically using the
autounattended.xml
file.
- The installation process will start automatically using the
- Once Windows is installed, connect to the internet.
- Install all available Windows updates and Microsoft Store updates.
- Reboot your system after updates are complete.
-
Open a terminal with administrator privileges.
-
Run the following commands
$url = "https://github.com/raxl8/.dotfiles/archive/refs/heads/main.zip" $downloadsPath = "$env:USERPROFILE\Downloads" Invoke-WebRequest -Uri $url -OutFile "$downloadsPath\dotfiles.zip" Expand-Archive -LiteralPath "$downloadsPath\dotfiles.zip" -DestinationPath "$downloadsPath" Set-Location "$downloadsPath\.dotfiles-main" powershell -EP Bypass -NoP .\setup.ps1
Follow any prompts or instructions provided by the setup script. Once complete, your Windows environment will be fully configured.
Follow these steps to set up WSL with NixOS and the dotfiles:
-
Open a terminal.
-
Run:
wsl -d NixOS --user root
-
Inside WSL, update Nix and set up the environment:
nix-channel --update cd nix-shell -p git
-
Setup SSH keys
- Can't really help with that
-
Inside the
nix-shell
, clone the dotfiles repository:git clone [email protected]:raxl8/.dotfiles.git ~/.dotfiles
-
Apply the NixOS configuration:
nixos-rebuild --flake ~/.dotfiles#wsl boot
-
Exit the environment:
exit exit
This will exit the `nix-shell` and then WSL.
- Back in the Windows terminal:
wsl -t NixOS wsl -d NixOS --user root exit wsl -t NixOS
- Re-enter WSL using:
wsl -d NixOS
- Move over SSH keys from root user
sudo mv /root/.ssh $"($env.HOME)/.ssh"
sudo chown -R $"($env.USER):users" $"($env.HOME)/.ssh"
- Create git directory and move over dotfiles repository
mkdir git
sudo mv /root/.dotfiles $"($env.HOME)/git/.dotfiles"
sudo chown -R $"($env.USER):users" $"($env.HOME)/git/.dotfiles"
Your WSL setup should now be ready to use.