From eeb93fb5cb37b3df4f986561626812bc432fd57c Mon Sep 17 00:00:00 2001 From: Himadri Bhattacharjee <107522312+lavafroth@users.noreply.github.com> Date: Wed, 13 Mar 2024 10:26:58 +0530 Subject: [PATCH] refactor: separate language specific packages into modules --- hosts/default/configuration.nix | 35 +++++---------------------------- hosts/default/ctf.nix | 17 ++++++++++++++++ hosts/default/python.nix | 10 ++++++++++ hosts/default/rust.nix | 8 ++++++++ 4 files changed, 40 insertions(+), 30 deletions(-) create mode 100644 hosts/default/ctf.nix create mode 100644 hosts/default/python.nix create mode 100644 hosts/default/rust.nix diff --git a/hosts/default/configuration.nix b/hosts/default/configuration.nix index ca353d1..6c4f7dd 100644 --- a/hosts/default/configuration.nix +++ b/hosts/default/configuration.nix @@ -133,44 +133,29 @@ extraGroups = [ "networkmanager" "wheel" "uinput" ]; packages = with pkgs; let - pythonPackages = python311.withPackages (ps: with ps; [ - jupyter - python-lsp-server - python-lsp-ruff - pandas - requests - xlrd - xlwt - ]); + pythonWithPackages = import ./python.nix pkgs; + rustPackages = import ./rust.nix pkgs; + ctfPackages = import ./ctf.nix pkgs; in + rustPackages ++ ctfPackages ++ [ - bettercap blackbox-terminal broot - cargo - cargo-deny celluloid - clippy dxvk evcxr fd feroxbuster ffmpeg-full - ffuf file fractal - gau gh - ghidra gimp - gitleaks glow gnome.gnome-boxes gnome-secrets go gopls - hashcat - hcxtools hyperfine i2p jellyfin-media-player @@ -186,25 +171,16 @@ lutris mariadb marksman - nikto nil nitch - nmap ollama openvpn - patchelf pkg-config - pwntools - pythonPackages + pythonWithPackages qemu qrencode rnote - rust-analyzer - rustc - rustfmt - rustscan signal-desktop - sqlmap tor-browser-bundle-bin ungoogled-chromium unrar @@ -264,7 +240,6 @@ adw-gtk3 aircrack-ng bat - eza git gnupg helix diff --git a/hosts/default/ctf.nix b/hosts/default/ctf.nix new file mode 100644 index 0000000..7a2baa7 --- /dev/null +++ b/hosts/default/ctf.nix @@ -0,0 +1,17 @@ +# Tools for pentesting and playing CTFs +{ pkgs, ... }: with pkgs; [ + bettercap + ffuf + gau + ghidra + gitleaks + hashcat + hcxtools + nikto + nmap + patchelf + pwntools + rustscan + sqlmap + s3scanner +] diff --git a/hosts/default/python.nix b/hosts/default/python.nix new file mode 100644 index 0000000..4900cc2 --- /dev/null +++ b/hosts/default/python.nix @@ -0,0 +1,10 @@ +{ pkgs, ... }: +pkgs.python311.withPackages (ps: with ps; [ + jupyter + python-lsp-server + python-lsp-ruff + pandas + requests + xlrd + xlwt +]) diff --git a/hosts/default/rust.nix b/hosts/default/rust.nix new file mode 100644 index 0000000..b0bcc51 --- /dev/null +++ b/hosts/default/rust.nix @@ -0,0 +1,8 @@ +{ pkgs, ... }: with pkgs; [ + cargo + cargo-deny + clippy + rust-analyzer + rustc + rustfmt +]