mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2026-12-05 23:43:30 +01:00
raspberry-pi-4: add poe-plus-hat, update poe-hat, use dtmerge instead of ftoverlay
This commit is contained in:
1 parent
ea3efc80f8
commit
128dad1c8d
5 files changed
+343
-15
No files matched your search
@@ -0,0 +1,22 @@
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
let
|
||||
callPackage = path: overrides:
|
||||
let f = import path;
|
||||
in f ((builtins.intersectAttrs (builtins.functionArgs f) pkgs) // overrides);
|
||||
cfg = config.hardware.raspberry-pi."4".apply-overlays-dtmerge;
|
||||
dt_ao_overlay = (final: prev: {
|
||||
deviceTree.applyOverlays = (prev.callPackage ./apply-overlays-dtmerge.nix { }).applyOverlays;
|
||||
});
|
||||
in {
|
||||
options.hardware = {
|
||||
raspberry-pi."4".apply-overlays-dtmerge = {
|
||||
enable = lib.mkEnableOption ''
|
||||
replace deviceTree.applyOverlays implementation to use dtmerge from libraspberrypi.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
nixpkgs.overlays = [ dt_ao_overlay ];
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user