-
Enable
system.d
sudo sh -c 'echo "[boot]" > /etc/resolv.conf' sudo sh -c 'echo "systemd=true" >> /etc/resolv.conf'
-
Fix name resolution on corporate networks
# Debian 12 does not yet support net.ipv4.ping_group_range which allows non-root pings sudo ping www.google.com # Run this if name resolution fails sudo unlink /etc/resolv.conf sudo sh -c 'echo "nameserver 8.8.8.8" > /etc/resolv.conf' # Prevent WSL from auto-generating resolv.conf on reboot sudo sh -c 'echo "[network]" >> /etc/resolv.conf' sudo sh -c 'echo "generateResolvConf=false" >> /etc/resolv.conf'
-
Reboot
# Run this on ps1 wsl -t debian wsl -d debian
-
Install
curl
sudo apt-get update && sudo apt-get install curl
-
Run the installer script
cd && bash <(curl https://raw.githubusercontent.com/urob/dotfiles/main/bootstrap.sh)
# Install Nix
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
# Start nix daemon without reloading shell
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
# Initialize home manager in current directory
cd <path/to/flake.nix>
nix run . -- init --switch . --impure
-
Rebuild config
# outOfStoreSymlinks require impure home-manager switch --flake <path/to/flake.nix> --impure
-
Update all packages
# update all inputs nix flake update --flake <path/to/flake.nix> # update a single flake input nix flake lock --update-input <input>
-
Permission errors when creating
outOfStoreSymlinks
: see issues #4692, #9579, and PR #9723error: … while setting up the build environment error: getting attributes of path '/nix/store/d5w0zqag0v8wkyab59aph7v9ypkr3h6y-hm_nvim': Permission denied
Workaround:
# uninstall nix if already installed /nix/nix-installer uninstall # install old-stable version 2.18.1 curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install --nix-package-url https://releases.nixos.org/nix/nix-2.18.1/nix-2.18.1-x86_64-linux.tar.xz
-
The following error occurs if
systemd
is not enablederror: could not set permissions on '/nix/var/nix/profiles/per-user' to 755: Operation not permitted
-
See https://nixos.wiki/wiki/Locales on how to set locales. TLDR: add the following to
.zshenv
(done automatically in my config):export LOCALE_ARCHIVE=/usr/lib/locale/locale-archive