Add NixOS server installer USB (disko LUKS + WiFi, hostname prompt)
- disko-server.nix: LUKS + ESP + ext4 root layout for disko-install - server-install: minimal NixOS config for new servers (hostname/WiFi via --system-config) - installer-iso: custom minimal ISO with iwlwifi; build with nix build .#installer-iso - scripts/nixos-server-install.sh: prompt hostname/disk, run disko-install - docs/server-installer-usb.md: build, write USB, optional live/installed WiFi - .gitignore: nixos/installer-wifi.nix; AGENTS.md + README.md notes Made-with: Cursor
This commit is contained in:
parent
b29d170654
commit
3e07a55f5b
11 changed files with 351 additions and 1 deletions
35
nixos/hosts/server-install.nix
Normal file
35
nixos/hosts/server-install.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
# Minimal NixOS config for disko-install (new servers).
|
||||
# Hostname and WiFi networks are overridden at install time via:
|
||||
# disko-install --system-config '{"networking":{"hostName":"my-server"},...}'
|
||||
# No host-specific hardware import; filesystems and LUKS come from disko-server.nix.
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
networking.hostName = "nixos"; # Override with --system-config at install
|
||||
networking.wireless.enable = true;
|
||||
# networks."SSID".psk set via --system-config or imperative.conf after boot
|
||||
|
||||
time.timeZone = "Europe/Copenhagen";
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
system.stateVersion = "24.11";
|
||||
|
||||
users.users.danny = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
# SSH keys: scp pubkey to server after install, then cat >> ~/.ssh/authorized_keys
|
||||
};
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PasswordAuthentication = false;
|
||||
KbdInteractiveAuthentication = false;
|
||||
};
|
||||
};
|
||||
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
environment.systemPackages = [ pkgs.git ];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue