Commit Graph
11 Commits
Author SHA1 Message Date
LGUG2Z 82366f7134 fix(nix): evaluation no longer reads store paths that builtins.path makes
nix flake check --no-build failed in the nix-eval job on the runner with "path ...-Cargo.lock is not
valid": crane's vendorCargoDeps runs pathExists on the lock at evaluation time, and `repoFile` is a
store path that builtins.path makes during evaluation. Nix 2.35 with an empty store, as on a fresh
runner, does not have it yet under --no-build; Lix, and a store that had seen the file, do.

The parsed lock now comes from the flake source (cargoLockParsed in nix/lib.nix), and the Windows guest
reads tools/test-partition.json the same way. The derivations are unchanged (same drv paths), so no
cache key moves. Reproduced and fixed with upstream Nix and an empty store:
nix shell nixpkgs#nixVersions.latest -c nix flake check --no-build --all-systems --store <empty dir>
2026-11-05 16:48:10 -08:00
LGUG2Z 56afe5b286 build(nix): the tests of komorebi-macos-core run in linux-nextest and macos-nextest 2026-11-05 15:51:50 -08:00
LGUG2Z 259575a1b3 build: route the workspace to crates/
The workspace members, the path dependencies, the include_str! and test
fixture paths, the recorder's indexed source keys, and the Nix source
filter and path literals follow the new layout. Cargo.lock is unchanged.
2026-11-05 15:03:27 -08:00
LGUG2Z 1db6d7d3fd build(nix): the recorder is built, checked and shipped by the flake
nix/recorder holds the native packages and checks of macOS and Linux (the recorder and the
sources it indexes are the "recorder" platform of nix/workspace-src.nix), the Windows
build has it as one of its members, and the dev shell gets ffmpeg, resvg and GStreamer. The
flake inputs komorebi-mac and komorebi-windows are gone: the sources are in the tree.
2026-11-05 15:03:27 -08:00
LGUG2Z 18e92e59d1 build(nix): the neutral crates' tests run in linux-nextest
linux-nextest ran only the tests of the Linux packages (-p komorebi -p
komorebi-linux ...). The tests of komorebi-layouts, komorebi-scrolling,
komorebi-themes and the shared crates/* (backend, collections, config, core,
protocol, settings, transport, komorebic-core) ran in no nix check. They are
platform neutral, so the check now names them too (explicit -p list: with
--workspace the feature unification of komorebi-daemon breaks windows-future
on Linux), and runs with --no-fail-fast so one run lists every failure.

Two of those tests read files that the Linux source did not have: the
schemas of every platform (komorebi-config schemas test) and the macOS CLI
pages (komorebic-core docs_cli), so nix/workspace-src.nix keeps schemas/ and
docs/macos/cli/ in the Linux source.

Verified: nix build .#checks.x86_64-linux.linux-nextest, 1532 tests run, 1532
passed (9.1 s of test time).
2026-11-05 15:03:27 -08:00
LGUG2Z 77289f6b20 docs(dev): flake-checks.md and the nix commands of build-and-test.md
docs/dev/flake-checks.md records why the evaluation of the checks needed more than
the host has (about 0.55 GB per VM suite and 0.4 GB per NixOS system of the module
check, nothing shared), the sets and what is in each, how they are exposed
(checkSets, checkMembers, defaultCheckSets in nix/checks.nix), the alternatives
rejected, what was measured with the sets (nix flake check --no-build 4.54 GB / 33 s
on one system, 6.55 GB / 40 s --all-systems; each set alone from 0.2 GB for the cheap
ones to 11.6 GB for linux-nixos-eval), and why windows-nextest and macos-nextest ran
no test.

build-and-test.md gets the commands for one set, the default and one member and
loses windows-nextest; flake.md, docs/linux/CONTRIBUTING.md, docs/linux/dev/vm-tests.md,
the comment of nix/linux/tests/vm/default.nix and the CI step of CUTOVER-PLAN.md name
the new places (checkSets, checkMembers, legacyPackages.<system>.vm.NAME) instead of the
placeholder heavyChecks and checks.<system>.vm-NAME. Not run: the docs build.
2026-11-05 15:03:27 -08:00
LGUG2Z 5961368c7d perf(nix): the overlays share one nixpkgs and one crane build per system
overlays.linux and overlays.forVmTests (which applies the first as well) ran
mkPkgs, a new `import nixpkgs` with the rust overlay, and the whole crane
mkKomorebiPackages once for every NixOS system an evaluation instantiated: every
node of every VM suite and every module scenario, twice each. lib.mkPkgs now
hands out one instance per system and the linux module builds the packages of
each Linux system once (buildFor).

The derivations are the same (drvPath of linux-clippy, vm-kwin and linux-run-kde
equal to those before). Measured on a scratch copy of the same change: the
stand-alone expression of 4 suites 2.15 -> 1.50 GB, 8 real suites 5.18 -> 4.79 GB,
linux-nixos-module-eval 10.3 -> 8.5 GB, plasma guests 9.0 -> 8.7 GB. It does not
make the heavy sets cheap: see docs/dev/flake-checks.md.
2026-11-05 15:03:27 -08:00
LGUG2Z 6038e53fc5 refactor(nix): the checks are separate sets
Every platform module now defines its checks as allChecks.<name> and the new
nix/checks.nix says which set each is in (fmt, deny, windows-lint, windows-test,
linux-lint, linux-test, linux-options, macos-lint, macos-test, macos-options,
linux-demo, linux-nixos-eval, vm-fast, vm-slow; the vm tiers come from the
suites). A check in no set, or in two, fails the evaluation. checks.<system>
holds the members of the sets that are not heavy, the same split flake-one made
(vm-*, the Plasma guests, the module scenarios and run-kde left out), and the
placeholder legacyPackages.<system>.heavyChecks is gone: every set is one
linkFarm derivation, legacyPackages.<system>.checkSets.<set>, and its members
are legacyPackages.<system>.checkMembers.<set>.<name>. legacyPackages.<system>.vm
is unchanged.

The linux module is mostly reindented (the split wrapper is gone); no check
changed. Verified: see the revision that composes the sets.

treefmt and pre-commit, which the treefmt-nix and git-hooks-nix modules add to checks themselves, are allChecks of nix/common.nix now (those modules' own entries are switched off, treefmt.flakeCheck and pre-commit.check.enable), so that they are members of the set fmt.
2026-11-05 15:03:27 -08:00
LGUG2Z ae9ee327f9 build(nix): one root flake for Windows, KDE Plasma and macOS
One flake.nix and one flake.lock replace the root flake that re-exported two nested flakes.
The inputs are one nixpkgs (the revision the KDE flake was locked to, f05535a0: the VM suites
run against its Plasma and KWin 6.8.2), one crane, rust-overlay (19ecdd08, rustc 1.99.1),
flake-parts, treefmt-nix and git-hooks-nix, all the KDE flake revisions, plus asc. A second
nixpkgs, nixpkgs-x86_64-darwin (16c7794d, the macOS flake pin), serves the x86_64-darwin
outputs only: evaluating that system with the unified pin throws (nixpkgs 26.11 dropped it).

Layout: nix/common.nix (systems, pkgs, treefmt, pre-commit, dev shells default and native,
default overlay), nix/lib.nix, nix/workspace-src.nix (one source per platform from the one Cargo
workspace: the platform members, its files of the shared crates told apart by name, the data
files, and stubs for the other members, which cargo needs), nix/{windows,linux,macos}/
{build,flake-module}.nix. The dependency derivations use a manifests-only dummy source, a plain
path, so crane reads nothing built at evaluation and the Darwin outputs evaluate on Linux.

Names: unprefixed outputs are the native build (Linux: KDE; Darwin: macOS); Windows cross
outputs are windows-*; checks are windows-*, linux-*, macos-* and vm-NAME; table in docs/dev/flake.md
(next revision). One deny.toml, one format-all and one version (workspace) are used by all.
PLACEHOLDER for the agent that owns the check sets: the checks that evaluate a NixOS system
or a VM (vm-*, linux-nixos-module-eval, linux-plasma-guests-eval, linux-run-kde*) are
legacyPackages.<system>.heavyChecks.<name>, not checks, because evaluating them needs more
memory than nix flake check --all-systems can use. The Plasma guests got a stub root file system
and boot loader (mkDefault, replaced by their vmVariant) so that nix flake check can evaluate
their toplevel.

Verified: nix flake check --no-build --all-systems passes (42 s, rc 0); nix flake check
--no-build passes. Not verified: any build (next revisions record them).
2026-11-05 15:03:27 -08:00
LGUG2Z 05698a34ba fix(nix): the nix files read the final directories
The pure moves put the KDE and macOS nix files under nix/linux and nix/macos but left the
relative paths they read: the JSON schema (now schemas/linux and schemas/macos), the example
configurations and key binding samples (docs/linux, docs/macos), the key binding fixtures
(komorebi-hotkeys at the top level), the wsl2 probe script (scripts/linux). Each path now
names the file in the final directory, one more directory up because the files are one level
deeper.

Not touched: flake.nix and the nested flakes (next revisions), which still name the old paths.

Verified: not verified (nothing evaluates until the flake is rewritten; the new flake checks
these paths).
2026-11-05 15:03:27 -08:00
LGUG2Z f01853ceca refactor(repo): move the KDE and macOS nix files under nix/ (pure move)
komorebi-for-kde/nix/ -> nix/linux/
komorebi-for-mac/nix/ -> nix/macos/

The nix expressions of the platforms (modules, option files, VM test suites, kwin effects,
the darwin module) sit next to the existing nix/workspace-src.nix. Renames only (252
files); the flakes that import them are replaced by one root flake later in this stack, so
nix does not evaluate at this revision.
2026-11-05 15:03:27 -08:00