2023-07-30 11:29:17 +03:00
|
|
|
{ config, pkgs, lib, ... }:
|
2023-07-28 15:39:50 +03:00
|
|
|
|
2023-08-22 19:39:11 +03:00
|
|
|
let
|
|
|
|
cfg = config.my.roles.devel;
|
|
|
|
in {
|
|
|
|
options.my.roles.devel.enable = lib.mkEnableOption "Enable tools for development programs";
|
|
|
|
config = lib.mkIf (cfg.enable) ( lib.mkMerge [{
|
2023-08-19 11:06:28 +03:00
|
|
|
nixpkgs.config.allowUnfree = true;
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
rustc
|
|
|
|
cargo
|
|
|
|
rustup
|
|
|
|
clang
|
|
|
|
llvm
|
|
|
|
lld
|
|
|
|
python3Full
|
2023-08-24 11:06:09 +03:00
|
|
|
gnumake
|
2023-08-19 11:06:28 +03:00
|
|
|
automake
|
|
|
|
autoconf
|
|
|
|
meson
|
|
|
|
ninja
|
2023-08-22 19:39:11 +03:00
|
|
|
picocom
|
|
|
|
screen
|
2023-09-04 21:54:55 +03:00
|
|
|
hyperfine
|
2023-08-19 11:06:28 +03:00
|
|
|
];
|
|
|
|
}
|
2023-08-22 19:39:11 +03:00
|
|
|
# Architecture-specific packages and configuration
|
2023-08-19 11:06:28 +03:00
|
|
|
(lib.mkIf (!pkgs.stdenv.isAarch64) {boot.binfmt.emulatedSystems = [ "aarch64-linux" ];})
|
2023-08-31 18:28:25 +03:00
|
|
|
(lib.mkIf (!pkgs.stdenv.isAarch32) {boot.binfmt.emulatedSystems = [ "armv6l-linux" ];})
|
2023-08-22 19:39:11 +03:00
|
|
|
(lib.mkIf (!pkgs.stdenv.isx86_64) {boot.binfmt.emulatedSystems = [ "x86_64-linux" "i686-linux" ];})
|
|
|
|
# Remove CLion from builds while I'm semi-online
|
2023-08-23 09:38:48 +03:00
|
|
|
# Install CLion only if we are on x86_64
|
2023-08-22 19:39:11 +03:00
|
|
|
/*(lib.mkIf (pkgs.stdenv.isx86_64) {
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
jetbrains.clion
|
|
|
|
];
|
|
|
|
})*/
|
2023-08-23 09:38:48 +03:00
|
|
|
# Install vscode only if we are on x86_64 or aarch64 or aarch32
|
2023-08-22 19:39:11 +03:00
|
|
|
(lib.mkIf (pkgs.stdenv.isx86_64 || pkgs.stdenv.isAarch64 || pkgs.stdenv.isAarch32) {
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
vscode
|
|
|
|
];
|
|
|
|
})
|
|
|
|
]);
|
2023-08-31 18:28:25 +03:00
|
|
|
}
|