os/modules/arduino/default.nix
Benjamin Bädorf 13ad9a26f3
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
refactor: Remove digga
2023-10-03 13:13:52 +02:00

28 lines
522 B
Nix

{
lib,
config,
pkgs,
...
}:
with lib; let
psCfg = config.pub-solar;
cfg = config.pub-solar.arduino;
in {
options.pub-solar.arduino = {
enable = mkEnableOption "Life with home automation";
};
config = mkIf cfg.enable {
users.users = pkgs.lib.setAttrByPath [psCfg.user.name] {
extraGroups = ["dialout"];
};
home-manager = with pkgs;
pkgs.lib.setAttrByPath ["users" psCfg.user.name] {
home.packages = [
arduino
arduino-cli
];
};
};
}