Fix recursive configuration

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

View file

@ -10,7 +10,21 @@
type = types.submodule (
{ extendModules, ... }:
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 { };
windowsVariant = osVariant.extendModules { };
in {

View file

@ -224,7 +224,7 @@ function Start-Setup {
foreach ($xpath in @("./ua:AutoLogon/ua:Username",
"./ua:UserAccounts/ua:LocalAccounts/ua:LocalAccount/ua:Name",
"./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 `

View file

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