Add Arduino module

This adds a small arduino development module that installs development
tooling and adds the user to the `dialout` group.
This commit is contained in:
Benjamin Bädorf 2022-08-10 22:43:54 +02:00
parent 0e8a2a4468
commit c2227ed013
No known key found for this signature in database
GPG key ID: 4406E80E13CD656C
2 changed files with 25 additions and 0 deletions

View file

@ -0,0 +1,23 @@
{ lib, config, pkgs, ... }:
with lib;
let
psCfg = config.pub-solar;
cfg = config.pub-solar.devops;
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
];
};
};
}

View file

@ -17,6 +17,8 @@ channels: final: prev: {
deploy-rs
tdesktop
arduino
arduino-cli
;
inherit (channels.pub-solar)