2023-07-30 11:29:17 +03:00
|
|
|
{ config, pkgs, lib, ... }:
|
2023-07-28 15:39:50 +03:00
|
|
|
|
2023-09-06 16:10:11 +03:00
|
|
|
let cfg = config.my.roles.devel;
|
2023-08-22 19:39:11 +03:00
|
|
|
in {
|
2023-09-06 16:10:11 +03:00
|
|
|
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-10-03 17:15:14 +03:00
|
|
|
nixfmt
|
2023-08-19 11:06:28 +03:00
|
|
|
];
|
|
|
|
}
|
2023-08-22 19:39:11 +03:00
|
|
|
# Architecture-specific packages and configuration
|
2023-09-06 16:10:11 +03:00
|
|
|
(lib.mkIf (!pkgs.stdenv.isAarch64) {
|
|
|
|
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
|
|
|
})
|
|
|
|
(lib.mkIf (!pkgs.stdenv.isAarch32) {
|
|
|
|
boot.binfmt.emulatedSystems = [ "armv6l-linux" ];
|
|
|
|
})
|
|
|
|
(lib.mkIf (!pkgs.stdenv.isx86_64) {
|
|
|
|
boot.binfmt.emulatedSystems = [ "x86_64-linux" "i686-linux" ];
|
|
|
|
})
|
2023-10-03 17:15:14 +03:00
|
|
|
(lib.mkIf (builtins.currentSystem != "riscv64-linux") {
|
|
|
|
boot.binfmt.emulatedSystems = [ "riscv64-linux" ];
|
2023-09-08 21:07:54 +03:00
|
|
|
})
|
|
|
|
|
2023-10-03 17:15:14 +03:00
|
|
|
/* # Install CLion only if we are on x86_64
|
|
|
|
(lib.mkIf (pkgs.stdenv.isx86_64) {
|
|
|
|
environment.systemPackages = with pkgs; [ jetbrains.clion ];
|
|
|
|
})
|
|
|
|
|
|
|
|
# Install vscode only if we are on x86_64 or aarch64 or aarch32
|
|
|
|
(lib.mkIf
|
|
|
|
(pkgs.stdenv.isx86_64 || pkgs.stdenv.isAarch64 || pkgs.stdenv.isAarch32) {
|
|
|
|
environment.systemPackages = with pkgs; [ vscode ];
|
|
|
|
})
|
|
|
|
*/
|
2023-08-22 19:39:11 +03:00
|
|
|
]);
|
2023-08-31 18:28:25 +03:00
|
|
|
}
|