added arduino module

This commit is contained in:
Sven Vogel 2023-12-22 14:41:26 +01:00
parent 665a1c0264
commit 690823d2cd
3 changed files with 27 additions and 2 deletions

21
dev/arduino.nix Normal file
View File

@ -0,0 +1,21 @@
{ pkgs, lib, config, ... }:
let
settings = import ./../settings.nix;
in
{
config = lib.mkMerge [
# Arduino IDE 1.x
(lib.mkIf (!settings.dev.arduino.ide2) {
environment.systemPackages = (with pkgs; [
arduino
]);
})
# Arduino IDE 2.x
(lib.mkIf settings.dev.arduino.ide2 {
environment.systemPackages = (with pkgs; [
arduino-ide
]);
})
];
}

View File

@ -11,5 +11,6 @@ in
++ lib.optionals settings.dev.dotnet [ ./dotnet.nix ] ++ lib.optionals settings.dev.dotnet [ ./dotnet.nix ]
++ lib.optionals settings.dev.python3.enable [ ./python3.nix ] ++ lib.optionals settings.dev.python3.enable [ ./python3.nix ]
++ lib.optionals settings.virtualisation.waydroid [ ./waydroid.nix ] ++ lib.optionals settings.virtualisation.waydroid [ ./waydroid.nix ]
++ lib.optionals settings.virtualisation.wine.enable [ ./wine.nix ]; ++ lib.optionals settings.virtualisation.wine.enable [ ./wine.nix ]
++ lib.optionals settings.dev.arduino.enable [ ./arduino.nix ];
} }

View File

@ -70,7 +70,10 @@ with import <nixpkgs> {};
scipy scipy
]; ];
}; };
arduino = {
enable = false; # enable arduino development platform
ide2 = true; # wether to use IDE 2.x or deprecated 1.x
};
lsp = { lsp = {
enable = true; enable = true;
# various language server # various language server