fix when overrides for device types gets merged

This commit is contained in:
UGA Innovation Factory
2025-12-16 14:52:00 -05:00
parent 769e1b0fed
commit e03199df28
2 changed files with 8 additions and 5 deletions

View File

@@ -170,10 +170,11 @@ let
lib.mapAttrsToList ( lib.mapAttrsToList (
deviceKey: deviceConfig: deviceKey: deviceConfig:
let let
usePrefix = deviceConfig.ugaif.host.useHostPrefix or true;
hostName = mkHostName prefix deviceKey usePrefix;
# Merge: base config -> overrides -> device-specific config # Merge: base config -> overrides -> device-specific config
mergedConfig = lib.recursiveUpdate (lib.recursiveUpdate baseConfig overrides) deviceConfig; mergedConfig = lib.recursiveUpdate (lib.recursiveUpdate baseConfig overrides) deviceConfig;
# Check useHostPrefix from the merged config
usePrefix = mergedConfig.ugaif.host.useHostPrefix or true;
hostName = mkHostName prefix deviceKey usePrefix;
in in
{ {
name = hostName; name = hostName;

View File

@@ -86,9 +86,11 @@
# Creates: nix-builder (without lxc prefix) # Creates: nix-builder (without lxc prefix)
nix-lxc = { nix-lxc = {
devices = { devices = {
"nix-builder" = { "nix-builder" = { };
ugaif.host.useHostPrefix = false; "usda-dash" = { };
}; };
overrides = {
ugaif.host.useHostPrefix = false;
}; };
}; };