mirror of
https://github.com/nix-community/raspberry-pi-nix.git
synced 2025-11-08 19:46:03 +01:00
14 lines
332 B
Nix
14 lines
332 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
let cfg = config.hardware.raspberry-pi.i2c;
|
|
in {
|
|
options.hardware.raspberry-pi.i2c = {
|
|
enable = lib.mkEnableOption "configuration for i2c";
|
|
};
|
|
config = lib.mkIf cfg.enable {
|
|
hardware = {
|
|
raspberry-pi.deviceTree.base-dtb-params = [ "i2c1=on" ];
|
|
i2c.enable = true;
|
|
};
|
|
};
|
|
}
|