mirror of
https://github.com/nix-community/raspberry-pi-nix.git
synced 2025-11-08 11:36:04 +01:00
19 lines
403 B
Nix
19 lines
403 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.config.all.base-dt-params = {
|
|
i2c = {
|
|
enable = true;
|
|
value = "on";
|
|
};
|
|
};
|
|
i2c.enable = true;
|
|
};
|
|
};
|
|
}
|