2022-08-10 20:43:54 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
with lib; let
|
|
|
|
psCfg = config.pub-solar;
|
|
|
|
cfg = config.pub-solar.devops;
|
|
|
|
in {
|
|
|
|
options.pub-solar.arduino = {
|
2023-10-05 22:14:50 +00:00
|
|
|
enable = mkOption {
|
|
|
|
description = "Life with home automation";
|
|
|
|
default = false;
|
|
|
|
};
|
2022-08-10 20:43:54 +00:00
|
|
|
};
|
|
|
|
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
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|