diff --git a/flake.nix b/flake.nix index d2ccdcf..52e3aa3 100644 --- a/flake.nix +++ b/flake.nix @@ -144,6 +144,15 @@ home-manager.users.nixos = { imports = [ ./features ]; home.stateVersion = "25.11"; + + # Live-ISO-only welcome. Pops a notification a few seconds + # after the graphical session is up and opens a terminal + # parked at the installer command, so the user never has to + # hunt for it. + wayland.windowManager.hyprland.extraConfig = nixpkgs.lib.mkAfter '' + exec-once = sh -c 'sleep 3; notify-send -u critical -t 0 "Welcome to Nomarchy" "Run \`sudo /etc/install.sh\` in the open terminal — or \`--dry-run\` to preview."' + exec-once = sh -c 'sleep 4; alacritty --title "Nomarchy Installer" -e bash -lc "echo; echo \"Welcome to the Nomarchy live ISO.\"; echo; echo \" sudo /etc/install.sh # install\"; echo \" sudo /etc/install.sh --dry-run # preview only\"; echo \" sudo /etc/install.sh --resume # resume after an interrupt\"; echo; exec bash"' + ''; }; } ]; diff --git a/hosts/live-iso.nix b/hosts/live-iso.nix index 07fac09..7a87e48 100644 --- a/hosts/live-iso.nix +++ b/hosts/live-iso.nix @@ -25,9 +25,16 @@ users.users.nixos.extraGroups = [ "wheel" "video" "render" "audio" "networkmanager" ]; # Graphics support for live environment. - # `virtio` is a no-op on real hardware (no virtio-gpu PCI device) but lets - # the ISO render correctly when booted in QEMU via nomarchy-test-live-iso. - boot.initrd.kernelModules = [ "amdgpu" "radeon" "nouveau" "i915" "virtio_gpu" ]; + # + # Force-loading every GPU driver in the initrd (amdgpu+radeon+nouveau+i915) + # panics most machines — only one of them can claim the GPU and the others + # explode. List them under `availableKernelModules` instead so udev only + # loads the one that matches the present hardware. We still force the AMD + # pair when Plymouth needs KMS early; `virtio_gpu` is auto-loaded when + # we're booted in QEMU via nomarchy-test-live-iso. + boot.initrd.availableKernelModules = [ + "amdgpu" "radeon" "nouveau" "i915" "virtio_gpu" + ]; services.xserver.videoDrivers = [ "amdgpu" "radeon" "nouveau" "modesetting" "fbdev" "virtio" ]; environment.etc."install.sh" = { @@ -35,9 +42,28 @@ mode = "0755"; }; + environment.etc."hardware-db.sh" = { + source = ../installer/hardware-db.sh; + mode = "0644"; + }; + environment.etc."disko-golden.nix" = { source = ../installer/disko-golden.nix; }; environment.etc."nomarchy".source = inputs.self; + + # Override the upstream installer helpLine (says "NixOS", points nowhere + # useful for us). Shown on every TTY before login and again as the MOTD. + services.getty.helpLine = lib.mkForce '' + + Welcome to the Nomarchy live environment. + + To install Nomarchy: sudo /etc/install.sh + To preview the install: sudo /etc/install.sh --dry-run + To resume an interrupted run: sudo /etc/install.sh --resume + + The graphical session autologins as 'nixos' (no password). + The 'nixos' and 'root' accounts have empty passwords. + ''; }