os/modules/arduino/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
522 B
Nix
Raw Normal View History

{
lib,
config,
pkgs,
...
}:
with lib; let
psCfg = config.pub-solar;
2023-09-12 20:07:05 +00:00
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
];
};
};
}