refactor: schema

This commit is contained in:
2026-05-06 21:57:58 +02:00
parent c01c13aa50
commit 4b6e05212c
27 changed files with 198 additions and 377 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ let
text = lib.concatStringsSep "\n" [
"# shellcheck disable=SC2016"
"cd ${lib.escapeShellArg workdir}"
"exec ${lib.escapeShellArg config.meta.desktop.terminalCommand} ${argString}"
"exec ${lib.escapeShellArg config.facts.desktop.terminalCommand} ${argString}"
];
};
in
+17 -9
View File
@@ -51,6 +51,7 @@ in
repo
;
};
machine = osConfig.facts.machine;
in
{
home = {
@@ -70,27 +71,34 @@ in
programs.niri.settings = {
outputs = lib.mapAttrs (
_: display:
let
scale = display.scale or null;
width = display.width or null;
height = display.height or null;
refresh = display.refresh or null;
in
{
position = {
inherit (display) x y;
x = display.x or 0;
y = display.y or 0;
};
}
// lib.optionalAttrs (display.primary or false) {
"focus-at-startup" = true;
}
// lib.optionalAttrs (display.scale != null) {
inherit (display) scale;
// lib.optionalAttrs (scale != null) {
inherit scale;
}
// lib.optionalAttrs (display.width != null && display.height != null && display.refresh != null) {
// lib.optionalAttrs (width != null && height != null && refresh != null) {
mode = {
inherit (display)
inherit
width
height
refresh
;
};
}
) osConfig.meta.machine.displays;
) (machine.displays or { });
environment.DISPLAY = ":0";
spawn-at-startup = [
@@ -156,9 +164,9 @@ in
};
binds = import ./_bindings.nix {
browserCommand = config.meta.desktop.browserCommand;
launcherCommand = config.meta.desktop.launcherCommand;
terminalCommand = config.meta.desktop.terminalCommand;
browserCommand = config.facts.desktop.browserCommand;
launcherCommand = config.facts.desktop.launcherCommand;
terminalCommand = config.facts.desktop.terminalCommand;
shortcutCommands = shortcuts.commands;
};
};