diff --git a/nixos-modules/genode-init.nix b/nixos-modules/genode-init.nix index 71ead5e..da5ea8c 100644 --- a/nixos-modules/genode-init.nix +++ b/nixos-modules/genode-init.nix @@ -13,6 +13,8 @@ in { options.genode.init = { + verbose = mkEnableOption "verbose logging"; + configFile = mkOption { description = '' Dhall configuration of this init instance after children have been merged. @@ -92,15 +94,20 @@ in { ''; }) cfg.subinits; - configFile = pkgs.writeText "init.dhall" '' + configFile = let + + children = + lib.mapAttrsToList (name: value: ", `${name}` = ${value.configFile}") + cfg.children; + + in pkgs.writeText "init.dhall" '' let Genode = env:DHALL_GENODE let baseConfig = ${cfg.baseConfig} - in baseConfig with children = baseConfig.children # toMap {${ - concatMapStrings - (name: ", `${name}` = (${cfg.children.${name}.configFile}) ") - (builtins.attrNames cfg.children) - } } + in baseConfig // { + , verbose = ${if config.genode.init.verbose then "True" else "False"} + , children = baseConfig.children # toMap {${toString children} } + } ''; };