Skip to content
David-KopczynskiPublic

About

NixOS WSL Work Setup

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🪟🐧 WSL

NixOS-WSL configuration targeted for work.

📁 Configuration Structure

This repository is structured into small nix files that are combined to create the system configuration. The general structure is as follows:

Directory Description
./channels channel configuration
./install general installation configurations

🚀 Setup

When copying the system to a new device it is necessary to install the base nixos.wsl-Image with wsl --install --name nix --from-file nixos.wsl. Afterwards, the setup script can be run with ./setup.sh within wsl -d nix to load this repository for the first time (when migrating the system to another device, the SSH keys in ~/.ssh should also be copied to the new device), followed by sudo nixos-rebuild switch to build the system.

Additionally, channels must be subscribed to manually with sudo nix-channel --add $URL $NAME and updated with sudo nix-channel --update. This setup requires the following channels:

sudo nix-channel --add https://nixos.org/channels/nixos-25.11 nixos
sudo nix-channel --add https://github.com/nix-community/NixOS-WSL/archive/refs/heads/release-25.11.tar.gz nixos-wsl

When reusing old configurations, make sure to update the stateVersion in the default configuration to the latest version.

⛓️‍💥 Recovery

If the system fails to boot, it is possible to open a recovery shell.

About

NixOS WSL Work Setup

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages