{ pkgs, inputs, lib, homeDirectory, config, username, stateVersion, ... }: let rust_pkgs = with pkgs; [ (rust-bin.nightly.latest.default.override ({ extensions = [ "rust-src" "rust-analyzer" "clippy" "rustfmt" "rust-std" "cargo" ]; # thumbv7m-none-eabi target for stm32 targets = [ "thumbv7m-none-eabi" "wasm32-unknown-unknown" ]; })) cargo-expand cargo-edit # cargo upgrade and stuff cargo-pgo rust-script bolt_19 libllvm # llvm-profdata cargo-show-asm cargo-flamegraph ]; lsps = with pkgs; [ # java jdt-language-server # HTML/CSS/JSON/ESLint language servers vscode-langservers-extracted nil # nix lsp yaml-language-server # yaml lsp marksman # markdown lsp typescript-language-server # typescript lsp cmake-language-server # cmake lsp typescript ]; java_tools = with pkgs; [ # java development google-java-format # formatter jdk # java # java assembler # BUG! broken # jasmin ]; # hardware diagnostics — wanted on dev machines, not part of the shared # terminal profile (which is meant to be portable to any machine). hw_diag = with pkgs; [ smartmontools lm_sensors pciutils ]; # dev-only tools. Universal CLI (bat, rg, htop, jq, …) lives in terminal.nix. dev_tools = with pkgs; [ # python formatter ruff # for website generation hugo go waypipe sshfs # serial viewer minicom ffmpeg-full # microcontroller tooling probe-rs-tools (python313.withPackages ( ps: with ps; [ mypy # type checking types-requests # add types for requests methods python-lsp-server # lsp python-lsp-ruff # ruff integration pyserial numpy matplotlib notebook pandas ] )) binwalk # clang-format and clang-tidy clang-tools clang gdb nixpkgs-review nmap # terminal image viewer timg tcpdump borgbackup # used to deploy nix system to server # (and in the future, desktop) deploy-rs # power stuff powerstat yt-dlp # JS runtime bun # convert between various units units ]; in { imports = [ ./terminal.nix ../progs/pi.nix ( { ... }: { nixpkgs.overlays = [ inputs.rust-overlay.overlays.default ]; } ) ]; home.stateVersion = stateVersion; home.packages = lib.concatLists [ rust_pkgs lsps java_tools hw_diag dev_tools ]; # fish aliases that depend on packages only present in this profile. # Universal aliases (ls/la/ll/lt, git-size) live in home/progs/fish.nix. programs.fish.shellAliases = { c = "${lib.getExe pkgs.cargo}"; cr = "${lib.getExe pkgs.cargo} run"; cb = "${lib.getExe pkgs.cargo} build"; gcc-native = "${lib.getExe pkgs.gcc} -Q --help=target -mtune=native -march=native | ${lib.getExe pkgs.gnugrep} -E '^\\s+\\-(mtune|march)=' | ${pkgs.coreutils}/bin/tr -d '[:blank:]'"; }; # https://github.com/flamegraph-rs/flamegraph home.file.".cargo/config.toml".text = '' [target.${lib.strings.removeSuffix "-linux" pkgs.stdenv.hostPlatform.system}-unknown-linux-gnu] linker = "${lib.getExe pkgs.clang}" rustflags = ["-Clink-arg=-Wl,--no-rosegment"] ''; }