Merge pull request 'Add Arduino module' (#98) from feature/arduino into main
Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/98 Reviewed-by: hensoko <hensoko@noreply.example.org>
This commit is contained in:
commit
ebfd447037
23
modules/arduino/default.nix
Normal file
23
modules/arduino/default.nix
Normal 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
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -15,6 +15,8 @@ channels: final: prev: {
|
|||
deploy-rs
|
||||
|
||||
tdesktop
|
||||
arduino
|
||||
arduino-cli
|
||||
;
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue