mirror of
https://github.com/ivabus/nixos
synced 2024-11-10 02:25:18 +03:00
Ivan Bushchik
f916ffb2b4
Untested VF2 config, basic "user", option to enable users, option to enable git, basic graphics role, unfinished `router` role, global features Signed-off-by: Ivan Bushchik <ivabus@ivabus.dev>
56 lines
1.5 KiB
Nix
56 lines
1.5 KiB
Nix
{ config, pkgs, lib, ... }:
|
|
|
|
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 [
|
|
{
|
|
nixpkgs.config.allowUnfree = true;
|
|
environment.systemPackages = with pkgs; [
|
|
rustc
|
|
cargo
|
|
rustup
|
|
clang
|
|
llvm
|
|
lld
|
|
python3Full
|
|
gnumake
|
|
automake
|
|
autoconf
|
|
meson
|
|
ninja
|
|
picocom
|
|
screen
|
|
hyperfine
|
|
nixfmt
|
|
];
|
|
}
|
|
# Architecture-specific packages and configuration
|
|
(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" ];
|
|
})
|
|
(lib.mkIf (builtins.currentSystem != "riscv64-linux") {
|
|
boot.binfmt.emulatedSystems = [ "riscv64-linux" ];
|
|
})
|
|
|
|
/* # 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 ];
|
|
})
|
|
*/
|
|
]);
|
|
}
|