Files
nixos-config/home-manager/commands/commands.nix
T

244 lines
4.9 KiB
Nix

{
pkgs,
pkgs-unstable,
lib,
hostname,
hostTypes,
...
}: {
imports = [
./direnv.nix
# ./custom/custom.nix
./eza.nix
./fastfetch/fastfetch.nix
./git.nix
./newsboat.nix
./nixvim/default.nix
./starship.nix
./tmux.nix
./zsh.nix
];
home.packages = with pkgs;
[
# Common packages for all systems
alejandra
age
age-plugin-1p
age-plugin-yubikey
agedu
b3sum
bandwhich
bat
basalt
btop
cpufetch
curl
dig
docker
dust
fd
file
findutils
fosrl-olm
fzf
git
git-filter-repo
glances
gping
graphviz
jq
kitty
kopia
lazydocker
lazygit
lazyjournal
manga-tui
mcat
nettools
nix-du
nixfmt
nix-prefetch-github
nmap
openssh
openssl
ptunnel
ripgrep
s3cmd
timg
tldr
trippy
trivy
tuptime
unzip
wget
wireguard-tools
yazi
yt-dlp
zstd
pkgs-unstable.herdr
]
# Desktop-specific packages (Linux desktops and macOS)
++ lib.optionals (!(hostTypes.isServer hostname)) (with pkgs; [
claude-code
caligula
ocamlPackages.utop
opencode
openconnect
yubikey-manager
zed-editor
])
# Server-specific packages
++ lib.optionals (hostTypes.isServer hostname) (with pkgs; [
cpu-x
cpuid
ffmpeg-full
gparted
netop
parted
plocate
tailscale
tlp
traceroute
pkgs-unstable.witr
])
# Linux desktop packages
++ lib.optionals (hostTypes.isLinuxDesktop hostname) (with pkgs; [
cpu-x
cpuid
gparted
netop
plocate
swaynotificationcenter
tlp
nerd-fonts.jetbrains-mono
nerd-fonts.hack
nerd-fonts.fira-code
dejavu_fonts
])
# Pentesting/security tools (eva-01 and eva-03)
++ lib.optionals (builtins.elem hostname ["eva-01" "eva-03"]) (with pkgs; [
aircrack-ng
amass
bettercap
bloodhound
bully
burpsuite
cowpatty
crunch
dirbuster
dnschef
ffuf
hash-identifier
hashcat
hashcat-utils
hcxdumptool
hcxtools
hping
macchanger
medusa
metasploit
netdiscover
netexec
pwnat
pwncat
reaverwps-t6x
recon-ng
rustscan
sqlmap
steghide
thc-hydra
wifite2
wirelesstools
pkgs-unstable.binsider
])
# eva-01 specific
++ lib.optionals (hostname == "eva-01") [
pkgs.rpi-imager
pkgs.libusb1
pkgs.parted
pkgs.traceroute
pkgs.android-tools
]
# eva-03 specific
++ lib.optionals (hostname == "eva-03") [
pkgs.parted
pkgs.traceroute
pkgs.ffmpeg-full
pkgs-unstable.vscode
(pkgs-unstable.llama-cpp.override {cudaSupport = true;})
pkgs-unstable.witr
]
# buildbox specific
++ lib.optionals (hostname == "buildbox") [
pkgs.parted
pkgs.opencode
pkgs.traceroute
pkgs.ffmpeg-full
pkgs-unstable.witr
]
# ender-ml specific
++ lib.optionals (hostname == "ender-ml") [
# pkgs-unstable.stable-diffusion-cpp-cuda
# (pkgs-unstable.llama-cpp.override {cudaSupport = true;})
# pkgs-unstable.witr
# pkgs-unstable.comfy-ui-cuda
]
# acheron specific
++ lib.optionals (hostname == "acheron") [
pkgs-unstable.witr
]
# eva-02 (macOS) specific
++ lib.optionals (hostname == "eva-02") [
pkgs-unstable.vscode
];
programs = {
ssh = {
enable = true;
enableDefaultConfig = false;
settings =
{
"*" =
{
setEnv = "TERM=xterm-256color";
forwardAgent = false;
forwardX11 = false;
serverAliveInterval = 0;
serverAliveCountMax = 3;
}
// lib.optionalAttrs (hostname == "armaros") {
identityFile = "~/.ssh/agent-machines";
};
}
// lib.optionalAttrs (hostname == "buildbox" || hostname == "ender-ml" || hostname == "armaros") {
"192.168.8.109" = {
identityFile = "~/.ssh/gitea-headless";
user = "gitea";
};
"gitea.miguelmuniz.com" = {
identityFile = "~/.ssh/gitea-headless";
user = "gitea";
};
"github.com" = {
identityFile = "~/.ssh/github-headless";
user = "git";
};
};
extraConfig =
if hostname == "eva-02"
then ''
IdentityAgent "~/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"
''
else ''
IdentityAgent ~/.1password/agent.sock
'';
};
zoxide = {
enable = true;
enableZshIntegration = true;
};
};
}