2
0
Fork 0

nixos: add genode.init.verbose enable option

llvm-11
Emery Hemingway 2 years ago
parent 6e37206cb3
commit cd5f6f84f8
  1. 19
      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} }
}
'';
};

Loading…
Cancel
Save