From 4dabd970f0e4f09a5c03d467d845c4a21206db2d Mon Sep 17 00:00:00 2001 From: Raito Bezarius Date: Mon, 9 Dec 2024 00:09:21 +0100 Subject: [PATCH] feat: use iproute2 by default instead of busybox iproute2 brings so much on the table, it's worth it. Signed-off-by: Raito Bezarius --- modules/base.nix | 2 +- modules/busybox.nix | 2 +- overlay.nix | 11 +++++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/modules/base.nix b/modules/base.nix index 5107e1e..a342539 100644 --- a/modules/base.nix +++ b/modules/base.nix @@ -130,7 +130,7 @@ in { nixpkgs.buildPlatform = lib.mkDefault builtins.currentSystem; defaultProfile.packages = with pkgs; - [ s6 s6-init-bin execline s6-linux-init s6-rc ]; + [ s6 s6-init-bin execline s6-linux-init s6-rc iproute2 ]; # Set the useful PS1 prompt by default. defaultProfile.environmentVariables.PS1 = lib.mkDefault config.defaultProfile.prompt; diff --git a/modules/busybox.nix b/modules/busybox.nix index 718cafd..ee3b09b 100644 --- a/modules/busybox.nix +++ b/modules/busybox.nix @@ -37,7 +37,7 @@ let "comm" "cp" "cpio" "cut" "date" "dhcprelay" "dd" "df" "dirname" "dmesg" "du" "echo" "egrep" "env" "expand" "expr" "false" "fdisk" "fgrep" "find" "free" "fuser" "grep" "gunzip" "gzip" "head" "hexdump" "hostname" "hwclock" - "ifconfig" "ip" "ipaddr" "iplink" "ipneigh" "iproute" "iprule" "kill" + "ifconfig" "ipneigh" "kill" "killall" "killall5" "less" "ln" "ls" "lsattr" "lsof" "md5sum" "mkdir" "mknod" "mktemp" "mount" "mv" "nc" "netstat" "nohup" "od" "pgrep" "pidof" "ping" "ping6" "pkill" "pmap" "printenv" "printf" "ps" "pwd" "readlink" diff --git a/overlay.nix b/overlay.nix index 0a30478..1aa7bf1 100644 --- a/overlay.nix +++ b/overlay.nix @@ -201,6 +201,17 @@ extraPkgs // { graphviz = null; }; + iproute2 = prev.iproute2.overrideAttrs (old: { + postInstall = '' + ${(old.postInstall or "")} + non_necessary_binaries=("tc" "rdma" "dcb" "tipc" "vdpa") + for needless_binary in "$non_necessary_binaries[@]"; do + echo "Removing unnecessary binary $out/$needless_binary" + rm "$out/$needless_binary" + done + ''; + }); + wpa_supplicant = prev.wpa_supplicant.override { dbusSupport = false; withPcsclite = false;