Minimal NixOS flake for Surface Book 2 (NVIDIA 1050) with:
- Niri
- Noctalia
- Zen Browser + qutebrowser
- kitty + fish + starship
- neovim (dotfile-managed)
hosts/SurfaceBook2: host-specific filesmodules/common: reusable minimal moduleshome/ocean: home-managerhome/ocean/.config: dotfiles (niri,noctalia,nvim)
- Browser configs (
zen,qutebrowser) are not declaratively overridden. niri/noctalia/nvimtemplates are seeded to~/.configand stay user-editable.xdg-user-dirsis pinned to English names (Downloads,Pictures, etc.) even with Chinese locale.
- Initial user/password is
ocean / 1234. Change it after first login. - Login manager is
greetd(tuigreet) and is declared inmodules/common/niri-core.nix.
curl -fsSL https://raw.githubusercontent.com/ocean-sudo/nixos-surfacebook2/main/scripts/bootstrap.sh | sudo bashThis bootstrap script:
- Downloads repo as tarball (no
gitdependency under sudo/root). - Regenerates
hosts/SurfaceBook2/hardware-configuration.nix. - Applies config with
--flake path:/etc/nixos/nixos-surfacebook2#SurfaceBook2.
That path: flake source avoids the classic issue where git-based flakes ignore untracked generated files.
sudo nixos-generate-config --show-hardware-config > hosts/SurfaceBook2/hardware-configuration.nix
sudo nixos-rebuild switch --flake "path:$(pwd)#SurfaceBook2"# Use your own tarball URL/branch artifact
REPO_TARBALL_URL=... \
REPO_BRANCH=main \
TARGET_DIR=/etc/nixos/nixos-surfacebook2 \
FLAKE_HOST=SurfaceBook2 \
curl -fsSL <raw-bootstrap-url> | sudo -E bash