fix(mibook): boot-menu terminal choice via specialisation
The previous startOnBoot approach booted mibook headless by default and locked the machine out: it is WiFi-only with credentials in KWallet, so with no desktop session NetworkManager never joins the network (no SSH), and boot stalled on NetworkManager-wait-online with the tty1 prompt buried under service logs. Replace it with a NixOS specialisation that adds a separate 'terminal' GRUB entry: - default entry boots KDE as before (identical to baseline); - 'terminal' entry boots multi-user.target with autologin for finn and a 'desktop' command to start SDDM on demand. Also disable NetworkManager-wait-online so boot never stalls on the network. Revert the kde-desktop startOnBoot option. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CfozKLQdUh5TzqyjSigLUx
This commit is contained in:
@@ -20,7 +20,6 @@
|
||||
useOSProber = true;
|
||||
};
|
||||
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver.xkb = {
|
||||
layout = "de";
|
||||
@@ -34,7 +33,6 @@
|
||||
services.printing.enable = true;
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
|
||||
hardware.nvidia.prime = {
|
||||
sync.enable = false;
|
||||
|
||||
@@ -44,6 +42,37 @@
|
||||
|
||||
services.openssh.enable = true;
|
||||
|
||||
# Don't let boot stall waiting for a network that may never come up
|
||||
# (WiFi credentials live in KWallet and need a desktop session), which
|
||||
# otherwise hangs the terminal boot before the login prompt appears.
|
||||
systemd.services.NetworkManager-wait-online.enable = false;
|
||||
|
||||
# Boot-time choice: the default GRUB entry boots straight into KDE.
|
||||
# A separate "terminal" entry (a NixOS specialisation) boots to a text
|
||||
# console with autologin, where you can work or run `desktop` to bring
|
||||
# KDE up. Pick the entry you want in the GRUB menu at boot.
|
||||
#
|
||||
# NOTE: in terminal mode WiFi will not connect on its own (the password
|
||||
# is stored per-user in KWallet). To reach the machine over SSH from
|
||||
# terminal mode, first save the WiFi as a system connection in KDE:
|
||||
# network settings -> your WiFi -> "All users may connect to this network".
|
||||
specialisation.terminal.configuration = {
|
||||
system.nixos.tags = [ "terminal" ];
|
||||
|
||||
# Boot to a text console. graphical.target is what pulls in the display
|
||||
# manager (via its embedded Wants=display-manager.service), so defaulting
|
||||
# to multi-user.target leaves SDDM installed but not started at boot.
|
||||
systemd.defaultUnit = lib.mkForce "multi-user.target";
|
||||
|
||||
# Guarantee a usable shell on the console (no login prompt to hunt for).
|
||||
services.getty.autologinUser = "finn";
|
||||
|
||||
# Bring the desktop up on demand from the terminal.
|
||||
environment.systemPackages = [
|
||||
(pkgs.writeShellScriptBin "desktop" "exec sudo systemctl start display-manager.service")
|
||||
];
|
||||
};
|
||||
|
||||
# KDE (PowerDevil) power settings: do nothing on lid close while on AC power.
|
||||
# Shipped as a system-wide default; KConfig cascades so a user's own
|
||||
# ~/.config/powerdevilrc will override this if present.
|
||||
|
||||
Reference in New Issue
Block a user