Fix recursive configuration

This commit is contained in:
Manuel Thalmann 2024-08-25 03:58:28 +02:00
parent 76a14de51d
commit c350a9c26b
3 changed files with 17 additions and 3 deletions

View file

@ -10,7 +10,21 @@
type = types.submodule ( type = types.submodule (
{ extendModules, ... }: { extendModules, ... }:
let let
osVariant = extendModules { }; osVariant = extendModules {
modules = [
({ config, ... }: {
options = {
config = mkOption {
type = types.attrs;
description = "The configuration of the Operating System.";
default = builtins.removeAttrs config ["_module" "config" "linux" "windows"];
visible = false;
};
};
})
];
};
linuxVariant = osVariant.extendModules { }; linuxVariant = osVariant.extendModules { };
windowsVariant = osVariant.extendModules { }; windowsVariant = osVariant.extendModules { };
in { in {

View file

@ -224,7 +224,7 @@ function Start-Setup {
foreach ($xpath in @("./ua:AutoLogon/ua:Username", foreach ($xpath in @("./ua:AutoLogon/ua:Username",
"./ua:UserAccounts/ua:LocalAccounts/ua:LocalAccount/ua:Name", "./ua:UserAccounts/ua:LocalAccounts/ua:LocalAccount/ua:Name",
"./ua:UserAccounts/ua:LocalAccounts/ua:LocalAccount/ua:DisplayName")) { "./ua:UserAccounts/ua:LocalAccounts/ua:LocalAccount/ua:DisplayName")) {
$oobeSettings.SelectSingleNode($xpath, $namespace).InnerText = $valhallaConfig.setupUser; $oobeSettings.SelectSingleNode($xpath, $namespace).InnerText = $valhallaConfig.setupUser.name;
} }
Add-StartupCommand ` Add-StartupCommand `

View file

@ -202,7 +202,7 @@ begin
find "$projectPath/profiles" -type f -name "*.nix" | while read -l file find "$projectPath/profiles" -type f -name "*.nix" | while read -l file
set -l CONFIG_MODULE "$file" set -l CONFIG_MODULE "$file"
getConfig "valhalla.windows" --json > "$file.json" getConfig "valhalla.windows.config" --json > "$file.json"
end end
end end