1
0
Fork 0
mirror of https://github.com/samueldr/wip-pinebook-pro.git synced 2024-11-05 18:49:41 +01:00
wip-pinebook-pro/configuration.nix

63 lines
1.3 KiB
Nix
Raw Normal View History

{ config, pkgs, lib, ... }:
2020-01-06 23:09:56 +01:00
let
uboot = pkgs.uBootPinebookPro;
in
{
imports = [
2020-01-06 23:09:56 +01:00
<nixpkgs/nixos/modules/profiles/base.nix>
<nixpkgs/nixos/modules/profiles/minimal.nix>
<nixpkgs/nixos/modules/profiles/installation-device.nix>
2020-01-06 23:09:56 +01:00
./nixos/sd-image-aarch64.nix
];
nixpkgs.overlays = [
(import ./overlay.nix)
];
2020-01-06 22:03:48 +01:00
boot.kernelPackages = pkgs.linuxPackages_pinebookpro;
2020-01-06 23:09:56 +01:00
2020-01-07 01:50:35 +01:00
# This list of modules is not entirely minified, but represents
# a set of modules that is required for the display to work in stage-1.
# Further minification can be done, but requires trial-and-error mainly.
boot.initrd.kernelModules = [
# Rockchip modules
"rockchip_rga"
"rockchip_saradc"
"rockchip_thermal"
"rockchipdrm"
# GPU/Display modules
"analogix_dp"
"cec"
"drm"
"drm_kms_helper"
"dw_hdmi"
"dw_mipi_dsi"
"gpu_sched"
"panel_simple"
"panfrost"
"pwm_bl"
# USB / Type-C related modules
"fusb302"
"tcpm"
"typec"
# Misc. modules
"cw2015_battery"
"gpio_charger"
"rtc_rk808"
];
2020-01-06 23:09:56 +01:00
sdImage = {
manipulateImageCommands = ''
(PS4=" $ "; set -x
dd if=${uboot}/idbloader.img of=$img bs=512 seek=64 conv=notrunc
dd if=${uboot}/u-boot.itb of=$img bs=512 seek=16384 conv=notrunc
)
'';
compressImage = lib.mkForce false;
};
}