raspberry-pi-nix/rpi/i2c.nix
Travis Staton 3d7a565149 init
2022-05-20 21:09:19 -04:00

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;
};
};
}