- Installer prompts for keyboard layout (with optional variant) and locale
via curated short list + Other… fallback into the full localectl list;
applies to the live session immediately (loadkeys + hyprctl) so the
rest of the install types correctly. Generated system.nix emits
console.keyMap, i18n.defaultLocale, and services.xserver.xkb.{layout,
variant}.
- New nomarchy.{system,}.formFactor enum (laptop|desktop, default laptop).
Installer auto-detects via /sys/class/power_supply/BAT* and lets the
user flip the answer. Waybar drops the battery widget on desktop;
battery-monitor service is gated on the same option.
- Lift waybar tray out of the collapsed group/tray-expander in the default
theme so nm-applet's icon is visible without expanding the drawer.
- Live ISOs (TTY + graphical) get baseline mkDefault keyMap/locale so the
installer's runtime override always wins.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
77 lines
2.7 KiB
Nix
77 lines
2.7 KiB
Nix
{ config, pkgs, inputs, lib, ... }:
|
|
|
|
{
|
|
# Live-ISO defaults. The install.sh keymap step calls `hyprctl keyword
|
|
# input:kb_layout` at runtime so the user's pick takes effect during the
|
|
# install, and writes the chosen value into the *installed* system.
|
|
console.keyMap = lib.mkDefault "us";
|
|
i18n.defaultLocale = lib.mkDefault "en_US.UTF-8";
|
|
services.xserver.xkb.layout = lib.mkDefault "us";
|
|
|
|
# Home Manager activation for the nixos live user is provided by the
|
|
# home-manager.nixosModules.home-manager module wired up in flake.nix.
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
git
|
|
gum
|
|
alacritty
|
|
parted
|
|
btrfs-progs
|
|
cryptsetup
|
|
inputs.disko.packages.${pkgs.stdenv.hostPlatform.system}.disko
|
|
(pkgs.makeDesktopItem {
|
|
name = "install-nomarchy";
|
|
desktopName = "Install Nomarchy";
|
|
exec = "alacritty -e sudo /etc/install.sh";
|
|
terminal = false;
|
|
categories = [ "System" ];
|
|
})
|
|
];
|
|
|
|
# Ensure the live environment user has the necessary groups for graphical acceleration and audio
|
|
users.users.nixos.extraGroups = [ "wheel" "video" "render" "audio" "networkmanager" ];
|
|
|
|
# Graphics support for live environment.
|
|
#
|
|
# 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" = {
|
|
source = ../installer/install.sh;
|
|
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.
|
|
'';
|
|
}
|