mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-17 22:33:12 +01:00
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).
This commit is contained in:
1 parent
bf300de007
commit
05698a34ba
12 files changed
+21
-21
No files matched your search
@@ -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;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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
|
||||
'';
|
||||
|
||||
|
||||
@@ -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"
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
}
|
||||
''
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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";
|
||||
};
|
||||
}
|
||||
@@ -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";
|
||||
};
|
||||
}
|
||||
@@ -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";
|
||||
};
|
||||
}
|
||||
@@ -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:
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in new issue
Block a user