From 05698a34bad5683de00c5dbbe1f704dfc0dedc9d Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Sun, 1 Nov 2026 07:48:53 -0800 Subject: [PATCH] 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). --- nix/linux/dev/run-kde.nix | 6 +++--- nix/linux/dev/wsl2-probe.nix | 2 +- nix/linux/nixos-module.nix | 2 +- nix/linux/tests/default.nix | 4 ++-- nix/linux/tests/keybindings.nix | 6 +++--- nix/linux/tests/nixos-module.nix | 4 ++-- nix/linux/tests/vm/suites/keys-skhd/default.nix | 2 +- nix/linux/tests/vm/suites/keys-sxhkd/default.nix | 2 +- nix/linux/tests/vm/suites/keys-whkd/default.nix | 2 +- nix/macos/darwin-module.nix | 4 ++-- nix/macos/tests/darwin-module.nix | 4 ++-- nix/macos/tests/default.nix | 4 ++-- 12 files changed, 21 insertions(+), 21 deletions(-) diff --git a/nix/linux/dev/run-kde.nix b/nix/linux/dev/run-kde.nix index 78d82ad4..63f4210d 100644 --- a/nix/linux/dev/run-kde.nix +++ b/nix/linux/dev/run-kde.nix @@ -65,7 +65,7 @@ let skhd's format. The repository is mounted at /repo: edit komorebi there and build it in this machine with `cargo`. - ${builtins.readFile ../../docs/skhdrc.sample} + ${builtins.readFile ../../../docs/linux/skhdrc.sample} ''; # the file the module starts the daemon with, which is the `--config` of its command line, and @@ -83,7 +83,7 @@ let } { name = "skhdrc"; - path = ../../docs/skhdrc.sample; + path = ../../../docs/linux/skhdrc.sample; } ]; @@ -271,7 +271,7 @@ in # the module's default mode, with the sample bindings of docs/skhdrc.sample keybindings = { format = "skhd"; - file = ../../docs/skhdrc.sample; + file = ../../../docs/linux/skhdrc.sample; }; }; diff --git a/nix/linux/dev/wsl2-probe.nix b/nix/linux/dev/wsl2-probe.nix index 89555901..6df9bce8 100644 --- a/nix/linux/dev/wsl2-probe.nix +++ b/nix/linux/dev/wsl2-probe.nix @@ -104,7 +104,7 @@ let text = '' export WSL2_PROBE_GUEST=${guest} export WSL2_PROBE_REV=${rev} - ${builtins.readFile ../../scripts/wsl2-probe.sh} + ${builtins.readFile ../../../scripts/linux/wsl2-probe.sh} ''; meta = { description = "Probes a NixOS-WSL2 machine for KVM, WSLg, a GPU and RDP, for a Plasma guest"; diff --git a/nix/linux/nixos-module.nix b/nix/linux/nixos-module.nix index 5b86905e..ca79c988 100644 --- a/nix/linux/nixos-module.nix +++ b/nix/linux/nixos-module.nix @@ -39,7 +39,7 @@ let }: pkgs.runCommand "validated-${name}" { nativeBuildInputs = [ pkgs.check-jsonschema ]; } '' grep -v '^\s*//' ${jsonFile} > clean.json - check-jsonschema --schemafile ${../schema.json} clean.json + check-jsonschema --schemafile ${../../schemas/linux/schema.json} clean.json cp clean.json $out ''; diff --git a/nix/linux/tests/default.nix b/nix/linux/tests/default.nix index 501c701e..8c7ed383 100644 --- a/nix/linux/tests/default.nix +++ b/nix/linux/tests/default.nix @@ -101,9 +101,9 @@ let # the file has comment lines (komorebi reads them), which the schema checker does not exampleJson = pkgs.runCommand "komorebi.example.json" { } '' - grep -v '^\s*//' ${../../docs/komorebi.example.json} > $out + grep -v '^\s*//' ${../../../docs/linux/komorebi.example.json} > $out ''; - schema = ../../schema.json; + schema = ../../../schemas/linux/schema.json; in pkgs.runCommand "nix-options-validation" { diff --git a/nix/linux/tests/keybindings.nix b/nix/linux/tests/keybindings.nix index 3cc2fbfe..aa1ef6b6 100644 --- a/nix/linux/tests/keybindings.nix +++ b/nix/linux/tests/keybindings.nix @@ -15,11 +15,11 @@ let in pkgs.runCommand "keybindings-fixtures" { - fixtures = ../../komorebi-hotkeys/tests/fixtures; + fixtures = ../../../komorebi-hotkeys/tests/fixtures; expected = ./keybindings.expected; samples = lib.fileset.toSource { - root = ../../docs; - fileset = lib.fileset.fileFilter (file: file.hasExt "sample") ../../docs; + root = ../../../docs/linux; + fileset = lib.fileset.fileFilter (file: file.hasExt "sample") ../../../docs/linux; }; } '' diff --git a/nix/linux/tests/nixos-module.nix b/nix/linux/tests/nixos-module.nix index 23bade17..d9aace20 100644 --- a/nix/linux/tests/nixos-module.nix +++ b/nix/linux/tests/nixos-module.nix @@ -344,13 +344,13 @@ let withFile = keybindings { format = "sxhkd"; - file = ../../komorebi-hotkeys/tests/fixtures/plain.sxhkdrc; + file = ../../../komorebi-hotkeys/tests/fixtures/plain.sxhkdrc; }; textAndFile = keybindings { format = "skhd"; text = "alt - h : komorebic focus left\n"; - file = ../../komorebi-hotkeys/tests/fixtures/plain.skhdrc; + file = ../../../komorebi-hotkeys/tests/fixtures/plain.skhdrc; }; # the typed `config` and the key bindings are two parts of one command line diff --git a/nix/linux/tests/vm/suites/keys-skhd/default.nix b/nix/linux/tests/vm/suites/keys-skhd/default.nix index a445123d..5d2dacff 100644 --- a/nix/linux/tests/vm/suites/keys-skhd/default.nix +++ b/nix/linux/tests/vm/suites/keys-skhd/default.nix @@ -6,7 +6,7 @@ script = "../../keys-corpus.py"; node.services.komorebi.keybindings = { format = "skhd"; - file = ../../../../../komorebi-hotkeys/tests/fixtures/vm.skhdrc; + file = ../../../../../../komorebi-hotkeys/tests/fixtures/vm.skhdrc; mode = "auto"; }; } diff --git a/nix/linux/tests/vm/suites/keys-sxhkd/default.nix b/nix/linux/tests/vm/suites/keys-sxhkd/default.nix index 7aa495f6..301eda30 100644 --- a/nix/linux/tests/vm/suites/keys-sxhkd/default.nix +++ b/nix/linux/tests/vm/suites/keys-sxhkd/default.nix @@ -6,7 +6,7 @@ script = "../../keys-corpus.py"; node.services.komorebi.keybindings = { format = "sxhkd"; - file = ../../../../../komorebi-hotkeys/tests/fixtures/vm.sxhkdrc; + file = ../../../../../../komorebi-hotkeys/tests/fixtures/vm.sxhkdrc; mode = "auto"; }; } diff --git a/nix/linux/tests/vm/suites/keys-whkd/default.nix b/nix/linux/tests/vm/suites/keys-whkd/default.nix index a6cfdf89..843c96e9 100644 --- a/nix/linux/tests/vm/suites/keys-whkd/default.nix +++ b/nix/linux/tests/vm/suites/keys-whkd/default.nix @@ -6,7 +6,7 @@ script = "../../keys-corpus.py"; node.services.komorebi.keybindings = { format = "whkd"; - file = ../../../../../komorebi-hotkeys/tests/fixtures/vm.whkdrc; + file = ../../../../../../komorebi-hotkeys/tests/fixtures/vm.whkdrc; mode = "auto"; }; } diff --git a/nix/macos/darwin-module.nix b/nix/macos/darwin-module.nix index 37d1096f..b0aa5632 100644 --- a/nix/macos/darwin-module.nix +++ b/nix/macos/darwin-module.nix @@ -11,8 +11,8 @@ let jsonFormat = pkgs.formats.json { }; - komorebiSchemaPath = ../schema.json; - komorebiBarSchemaPath = ../schema.bar.json; + komorebiSchemaPath = ../../schemas/macos/schema.json; + komorebiBarSchemaPath = ../../schemas/macos/schema.bar.json; filterNulls = value: diff --git a/nix/macos/tests/darwin-module.nix b/nix/macos/tests/darwin-module.nix index bbde00d1..4dbcf933 100644 --- a/nix/macos/tests/darwin-module.nix +++ b/nix/macos/tests/darwin-module.nix @@ -163,7 +163,7 @@ let testKomorebiConfigFile = evalDarwinModule { services.komorebi = { enable = true; - configFile = ../../docs/komorebi.example.json; + configFile = ../../../docs/macos/komorebi.example.json; }; }; @@ -171,7 +171,7 @@ let testBarConfigFile = evalDarwinModule { services.komorebi-bar = { enable = true; - bars.main.configFile = ../../docs/komorebi.bar.example.json; + bars.main.configFile = ../../../docs/macos/komorebi.bar.example.json; }; }; diff --git a/nix/macos/tests/default.nix b/nix/macos/tests/default.nix index 2f254e44..67efdf73 100644 --- a/nix/macos/tests/default.nix +++ b/nix/macos/tests/default.nix @@ -53,8 +53,8 @@ let builtins.toJSON configs.komorebi-bar-example ); - schemaPath = ../../schema.json; - barSchemaPath = ../../schema.bar.json; + schemaPath = ../../../schemas/macos/schema.json; + barSchemaPath = ../../../schemas/macos/schema.bar.json; in pkgs.runCommand "nix-options-validation"