Files
Nomarchy/hosts/nomarchy-live.nix
Bernardo Magri 3bdfc3552e feat: bump to NixOS 26.05 (Yarara) — WIP, desktop unverified on hardware
Bumps nixpkgs nixos-25.11 -> nixos-26.05, home-manager release-25.11 ->
release-26.05, and pins stylix to release-26.05 (was unpinned master).
`nix flake check --no-build` and `nomarchy-eval-matrix` are both clean and
the full system builds (nixos-system-nomarchy-26.05).

Breaking-change fixes required by 26.05:
- stylix-compat: drop the `programs.neovim.initLua` shim — HM 26.05 declares
  it natively, so the shim was a duplicate-option error.
- swww was renamed to awww (binaries gone, no `init` subcommand). Dropped swww
  entirely and unified the wallpaper path on swaybg (the daemon this distro
  actually runs): nomarchy-theme-bg-next now delegates to nomarchy-theme-bg-set,
  swaybg added to the theme-engine script deps, swww removed from package lists.
- default config: add a placeholder `fileSystems."/"` — 26.05's systemd stage-1
  forces fsType during plain toplevel eval (the VM build overrides it).
- services.resolved: extraConfig removed, domains/fallbackDns renamed -> migrated
  to settings.Resolve.* (RFC42).
- systemd.sleep.extraConfig removed -> settings.Sleep.HibernateDelaySec (RFC42).
- X11 'virtio' video driver removed -> dropped from vm-guest.nix and
  nomarchy-live.nix (modesetting drives virtio-gpu).
- nomarchy-eval-matrix: define /persist + /home in the impermanence scenarios
  (26.05 maps fsType over every neededForBoot filesystem).
- README/MIGRATION/installer: stale swww references -> swaybg.

KNOWN BLOCKER (why this is on a branch, not main):
In a headless QEMU VM, Hyprland boots and inits GL (virgl) fine but is
OOM-killed after ~19s (3.4 GB peak). Likely a no-display-consumer artifact of
headless rendering (unthrottled frames), but a real Hyprland-26.05 memory
regression can't be ruled out without a real display. Verify on real hardware
(a fresh ISO install) before merging to main; if the desktop is stable there,
the OOM was the headless VM and this can merge.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-06 15:46:17 +01:00

115 lines
4.4 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";
# ISO Branding
isoImage.volumeID = lib.mkForce "NOMARCHY_LIVE";
isoImage.edition = lib.mkForce "graphical";
# 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
mkpasswd
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"
];
# 'virtio' X11 driver was removed in nixpkgs 26.05; modesetting drives
# virtio-gpu via KMS.
services.xserver.videoDrivers = [ "amdgpu" "radeon" "nouveau" "modesetting" "fbdev" ];
# VM guest agents. Without these the virtio-gpu connector only advertises
# its 1024x768 fallback mode, so Hyprland's `monitor = , highres, …` rule
# picks that as the highest available resolution and the live session boots
# tiny. The agents let the SPICE/QEMU host negotiate a real resolution.
# (The installed system gets the same wiring via core/system/vm-guest.nix.)
services.spice-vdagentd.enable = true;
services.qemuGuest.enable = true;
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-config.nix" = {
source = ../installer/disko-config.nix;
};
environment.etc."nomarchy".source = inputs.self;
# Embed the git revision the ISO was built from so install.sh can pin the
# generated flake to the exact same commit. `inputs.self.rev` exists only
# when the flake is built from a clean git tree; from a dirty worktree we
# fall back to dirtyRev (which won't be resolvable by `git+https`, so the
# installer treats it as "unpinned"). Empty file = unpinned.
environment.etc."nomarchy-rev".text =
if inputs.self ? rev then inputs.self.rev
else "";
# Auto-login to the graphical session
services.displayManager.autoLogin.enable = true;
services.displayManager.autoLogin.user = "nixos";
# Allow passwordless sudo for the live user
security.sudo.wheelNeedsPassword = false;
# The live accounts have empty passwords, but pam_unix rejects an empty
# password by default — which leaves hyprlock unsolvable if the idle
# timer locks the session (nothing you can type unlocks it). Allow null
# passwords for the locker so it can be dismissed with a bare Enter.
# Live-ISO only: installed systems must never accept empty unlocks.
security.pam.services.hyprlock.allowNullPassword = true;
# 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.
'';
}