1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-17 04:51:31 +03:00
mobile-nixos/modules/hardware-screen.nix
Samuel Dionne-Riel 6095b623f6 Adds qemu-x86_64 device.
Network doesn't work :/
2018-06-17 20:55:34 -04:00

32 lines
642 B
Nix

{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.mobile.hardware.screen;
in
{
options.mobile.hardware.screen = {
width = mkOption {
type = types.int;
};
height = mkOption {
type = types.int;
};
fb_modes = mkOption {
type = types.nullOr types.path;
default = null;
description = ''
This file will be made available under /etc/fb.modes, and will be used
by `fbset` to setup the framebuffer.
'';
};
};
config.mobile.boot.stage-1 = mkIf (cfg.fb_modes != null) {
contents = [
{ object = cfg.fb_modes; symlink = "/etc/fb.modes"; }
];
};
}