Stage 4f cleanup. The flake moved from ~/dotfiles/nixos/ to ~/dotfiles/
in 88c5139; docs and install scripts hadn't been refreshed. Point all
rebuild / flake references at the new root:
- AGENTS.md, README.md, server-quickstart.md, docs/server-installer-usb.md,
docs/sunken-ship-wifi.md, nixos/readme.md — rebuild command paths.
- scripts/nixos-server-install.sh — auto-detect now looks for flake.nix
at repo root (was nixos/flake.nix).
- scripts/post-install-provision.sh — first-rebuild hint path.
`nixos/hosts/<host>-hardware.nix` and friends stay where they are —
host-specific NixOS modules still live under nixos/; only the flake
entry-points + sops/ + vars/ + lib/ + modules/ + flake-modules/ moved.
nixos/readme.md rewritten to reflect the split (flake at root, per-host
modules under nixos/).
1.2 KiB
1.2 KiB
NixOS server quick-start
Hostname, user, SSH, key-based login.
0. Installer choice
No Ethernet? Use the graphical ISO (nixos-graphical-*-x86_64-linux.iso). It has NetworkManager and a desktop—join Wi‑Fi in the GUI, then use a terminal. The minimal ISO has no GUI and Wi‑Fi on the live system is fiddly.
1. Prerequisites
NixOS installed, machine on the network, console or SSH.
2. Hostname
networking.hostName = "myserver";
3. User
users.users.danny = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" ];
# hashedPassword = "..."; # or omit for key-only
};
4. SSH
services.openssh.enable = true;
users.users.danny.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAA... your-key-comment"
];
To avoid committing keys (e.g. public repo): omit openssh.authorizedKeys and push keys via scp ~/.ssh/*.pub danny@server:/tmp/ then on server: cat /tmp/*.pub >> ~/.ssh/authorized_keys.
Optional: services.openssh.settings = { PasswordAuthentication = false; PermitRootLogin = "no"; };
5. Apply and test
sudo nixos-rebuild switch
# or: sudo nixos-rebuild switch --flake /path/to/dotfiles#hostname
Then from your main machine: ssh danny@myserver