System/home-manager/common/programs/devel.nix

120 lines
3.4 KiB
Nix

{ config, lib, pkgs, inputs, ... }:
let
devel = config.nathan.programs.devel;
unstable = inputs.nixpkgs-unstable.legacyPackages."${pkgs.system}";
inherit (import ../../../modules/lib.nix {
inherit lib;
inherit pkgs;
})
nLib;
in with lib;
with nLib; {
config = mkMerge [
# Core development utilites
(mkIf devel.core {
home.packages = with pkgs;
# General packages
[
# Git addons
git-secret
delta
# General development requirements
cmake
libtool
gnumake
# nix utilites
nixpkgs-fmt
inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.comma
nix-du
nix-index
inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.nix-init
nix-prefetch
nix-prefetch-git
inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.nurl
# sops for secrets management
sops
# Hut for sourcehut
inputs.nixpkgs-unstable.legacyPackages.${pkgs.system}.hut
];
programs = {
direnv = { enable = true; };
# Neovim
# (I'm not abonding emacs I just want the tutor)
neovim = { enable = true; };
};
})
# Rust development
(mkIf devel.rust {
home.packages = with pkgs; [
# Rustup for having the compiler around
rustup
# Misc cargo utilites
cargo-binutils # Allow invoking the llvm tools included with the toolchain
cargo-edit # Command line Cargo.toml manipulation
cargo-asm # Dump the generated assembly
cargo-fuzz # front end for fuzz testing rust
cargo-license # Audit the licenses of dependencies
cargo-criterion # Benchmarking front end
cargo-audit # Check dependencies for known CVEs
cargo-bloat # Find out what's taking up space in the executable
cargo-udeps # Find unused dependencies
cargo-expand # Dump expanded macros
cargo-play # Quickly execute code outside of a crate
# For building stuff that uses protocol buffers
protobuf
# For faster builds
sccache
];
})
# Python Development
(mkIf devel.python {
home.packages = with pkgs; [
(python311Full.withPackages (ps: with ps; [ pip ]))
nodePackages.pyright
];
})
# JavaScript/TypeScript Development
(mkIf devel.js {
home.packages = with unstable;
with nodePackages; [
nodejs
yarn
typescript
deno
# TODO reenable
# vscode-langservers-extracted
];
})
# Raku Development
(mkIf devel.raku { home.packages = with pkgs; [ rakudo zef ]; })
# Idris 2 Development
(mkIf devel.idris2 {
home.packages = with pkgs;
let
is = inputs.idris2.packages."${pkgs.system}".idris2.buildInputs;
chz = findSingle
(drv: let name = drv.pname; in (lib.strings.hasPrefix "chez" name))
{ } { } is;
in [
inputs.idris2.packages."${pkgs.system}".idris2
# chez
chz
gmp
rlwrap
];
})
# Haskell Development
(mkIf devel.haskell {
home.packages = with pkgs; [
(haskellPackages.ghcWithPackages
# TODO: readd brittany when its not broken
(p: with p; [ turtle cabal-install stack hoogle ]))
haskell-language-server
hlint
];
})
];
}