From 62dbad348627456f0591f26c88084aa7605e0342 Mon Sep 17 00:00:00 2001 From: Colin Date: Sat, 1 Jun 2024 20:20:37 +0000 Subject: [PATCH] polyunfill: remove a few more default systemPackages --- hosts/common/polyunfill.nix | 43 +++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/hosts/common/polyunfill.nix b/hosts/common/polyunfill.nix index ebdb368d..9341d8da 100644 --- a/hosts/common/polyunfill.nix +++ b/hosts/common/polyunfill.nix @@ -71,6 +71,49 @@ in }) filtered; }; + options.environment.systemPackages = lib.mkOption { + # see: + # it's 31 "requiredPackages", with no explanation of why they're "required"... + # most of these can be safely removed without breaking the *boot*, + # but some core system services DO implicitly depend on them. + # TODO: see which more of these i can remove (or shadow/sandbox) + apply = let + requiredPackages = builtins.map (pkg: lib.setPrio ((pkg.meta.priority or 5) + 3) pkg) [ + # pkgs.acl + # pkgs.attr + # pkgs.bashInteractive + # pkgs.bzip2 + # pkgs.coreutils-full + # pkgs.cpio + # pkgs.curl + # pkgs.diffutils + # pkgs.findutils + # pkgs.gawk + # pkgs.stdenv.cc.libc + # pkgs.getent + # pkgs.getconf + # pkgs.gnugrep + # pkgs.gnupatch + # pkgs.gnused + # pkgs.gnutar + # pkgs.gzip + # pkgs.xz + pkgs.less + # pkgs.libcap #< implicitly required by NetworkManager/wpa_supplicant! + # pkgs.ncurses + pkgs.netcat + # config.programs.ssh.package + # pkgs.mkpasswd + pkgs.procps + # pkgs.su + # pkgs.time + # pkgs.util-linux + # pkgs.which + # pkgs.zstd + ]; + in lib.filter (p: ! builtins.elem p requiredPackages); + }; + options.system.fsPackages = lib.mkOption { # adds `mtools` and `dosfstools` # dosfstools actually makes its way into the initrd (`fsck.vfat`).