Emery Hemingway
2afd2d08cc
Require that all init children declared by Nix be declared with an absolute path to the program binary.
58 lines
1.5 KiB
Nix
58 lines
1.5 KiB
Nix
{ config, pkgs, lib, ... }:
|
|
|
|
with lib;
|
|
|
|
let cfg = config.genode.gui;
|
|
in {
|
|
options.genode.gui = {
|
|
enable = mkEnableOption "Genode Gui service";
|
|
consoleLog = { enable = mkEnableOption "console log"; };
|
|
};
|
|
|
|
config = {
|
|
|
|
genode.gui.enable = cfg.consoleLog.enable;
|
|
|
|
hardware.genode.framebuffer.enable = cfg.enable;
|
|
|
|
genode.core.children.nitpicker = mkIf cfg.enable {
|
|
binary = "${pkgs.genodePackages.nitpicker}/bin/nitpicker";
|
|
configFile = pkgs.writeText "nitpicker.dhall" ''
|
|
let Init = (env:DHALL_GENODE).Init
|
|
|
|
in ${./nitpicker.dhall}
|
|
{ policies =
|
|
[ Init.Config.Policy::{
|
|
, service = "Gui"
|
|
, label = Init.LabelSelector.prefix "consoleLog"
|
|
, attributes = toMap { domain = "default" }
|
|
}
|
|
]
|
|
}
|
|
'';
|
|
};
|
|
|
|
genode.boot.romModules = mkIf cfg.consoleLog.enable {
|
|
"TerminusTTF.ttf" = pkgs.buildPackages.terminus_font_ttf
|
|
+ "/share/fonts/truetype/TerminusTTF.ttf";
|
|
};
|
|
|
|
genode.core.children.consoleLog = mkIf cfg.consoleLog.enable {
|
|
binary = "${pkgs.genodePackages.init}/bin/init";
|
|
extraInputs = with pkgs.genodePackages; [
|
|
gui_fb
|
|
log_core
|
|
libc
|
|
terminal
|
|
terminal_log
|
|
vfs_ttf
|
|
];
|
|
coreROMs = [ "core_log" "kernel_log" ];
|
|
configFile = pkgs.writeText "consoleLog.dhall" ''
|
|
${./consoleLog.dhall} { fontFile = "TerminusTTF.ttf" }
|
|
'';
|
|
};
|
|
|
|
};
|
|
}
|