Add NixVirt support and GPU passthrough configuration

This commit is contained in:
2026-06-11 22:18:01 -03:00
parent 202555c5f1
commit ce79bcd03f
11 changed files with 852 additions and 47 deletions
+18 -1
View File
@@ -139,9 +139,17 @@ let
keyringExtra = lib.optionalString keyringEnable keyringNiriStartupKdl;
extraConfigMerged = keyringExtra + rpi5Extra + (userExtra.extraConfig or "");
windowRules = (base.window-rules or [ ]) ++ (userExtra.window-rules or [ ]);
userExtraNoSpecial = lib.removeAttrs userExtra [ "window-rules" "extraConfig" "binds" ];
mergedBinds =
(base.binds or { })
// (userExtra.binds or { })
// (niriCfg.extraBinds or { });
in
lib.recursiveUpdate base (
lib.removeAttrs userExtra [ "window-rules" "extraConfig" ]
userExtraNoSpecial
// {
binds = mergedBinds;
}
// lib.optionalAttrs (windowRules != [ ]) {
window-rules = windowRules;
}
@@ -195,6 +203,15 @@ in
Merged into shared defaults `config.kdl` via wrapper-modules. Put raw KDL in `extraConfig`.
'';
};
extraBinds = lib.mkOption {
type = lib.types.attrsOf lib.types.anything;
default = { };
description = ''
Keybind overrides merged with shared defaults and `extraSettings.binds`.
Use this when multiple modules need to add binds without overwriting each other.
'';
};
};
config = lib.mkMerge [