forked from pub-solar/os
Benjamin Bädorf
45202d98ec
This adds a small arduino development module that installs development tooling and adds the user to the `dialout` group.
24 lines
503 B
Nix
24 lines
503 B
Nix
{ 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
|
|
];
|
|
};
|
|
};
|
|
}
|