-
Flash NixOS ISO Image to an USB stick
-
Boot into it
-
Setup wifi (if needed)
-
Start wpa_supplicant >
systemctl start wpa_supplicant -
Enable a wireless network >
wpa_cliadd_network 0 set_network 0 ssid "SSID" set_netwwork 0 psk "PSK" set_network 0 key_mgmt WPA-PSK enable_network 0
-
-
Partition the system
sudo nix --experimental-features 'nix-command flakes' run github:nix-community/disko -- --mode disko --flake github:m0nsterrr/nixos-home#<hostname>
-
Generate a hardware-configuration.nix
sudo nixos-generate-config --root /mnt
-
Build the system
sudo nixos-install
-
Reboot (be sure to turn off secureboot as it's not configured yet but in setup mode to be able to enroll key)
-
Login with the root account and fetch the flake template
nix --experimental-features 'nix-command flakes' flake new -t github:m0nsterrr/nixos-home ./nixos-home && cd nixos-home
-
Follow Lanzaboot quickstart If sbctl is not available in the current context you can do
nix-shell -p sbctl --run "sbctl create-keys" -
Update nixos config as needed
Important
Don't forget to whitelist your USB devices otherwise you will not be able to login.
nixos-rebuild switch --flake '.#<hostname>'-
Reboot, login with
lortegauser with passwordtemp123and don't forget to change it ! -
GG 🥳
Install Windows Terminal and JetBrainsMono Nerd Font.
Enable WSL2, download the latest NixOS release, and execute the downloaded file. Once it's installed, restart WSL with wsl --shutdown, open a new shell, and complete the installation:
sudo nix-channel --update
sudo nixos-rebuild switchChange your username and run:
cd ~
nix-shell -p git
nix --experimental-features 'nix-command flakes' flake new -t github:m0nsterrr/nixos-home ./nixos-home
cd nixos-home
sudo nixos-rebuild switch --flake '.#wsl'Install SSH client from winget winget install "openssh beta" (it can causes error using old version) Enable ssh-agent on windows and share UserProfile and ProgramFiles env var to WSL2, open powershell prompt with admin right
Get-Service ssh-agent | Set-Service -StartupType Automatic
Start-Service ssh-agent
setx WSLENV 'ProgramFiles/up:USERPROFILE/up'Install niperelay on windows
# Using WinGet
winget install npiperelay
# Or using Chocolatey
choco install npiperelay
# Or using a binary in %USERPROFILE%\.wsl
# for example : https://github.com/rupor-github/wsl-ssh-agent
Enable ssh agent support for OpenSSH on keepassXC
If you need to update the configuration at anytime.
sudo nixos-rebuild switch --flake github:m0nsterrr/nixos-home#<hostname>nix flake updateImport your GPG keys
gpg --import < priv.asc
gpg --import < pub.asc
gpg --import-ownertrust < trust.ascSome static files must be manually setup :
~/cifs/credentials~/wireguard-keys/homelab.peer~/.kube/static-kubeconfigs/<files>~/passwords.kdbx~/.aws/credentials