os/modules/arduino/default.nix

28 lines
521 B
Nix
Raw Normal View History

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