system: install busybox with low priority

it is a good fallback for common system commands
This commit is contained in:
NullBite 2025-02-05 17:11:09 -05:00
parent 2fe138d88c
commit 0221b8e3b4
Signed by: nullbite
GPG Key ID: 6C4D545385D4925A
3 changed files with 21 additions and 0 deletions

18
system/common/busybox.nix Normal file
View File

@ -0,0 +1,18 @@
{ config, pkgs, lib, ... }:
let
cfg = config.nixfiles.common.busybox;
in {
options.nixfiles.common.busybox.enable = lib.mkEnableOption "" // {
description = ''
Whether to install Busybox into the system environment as a very low
priority fallback for common commands. This should *never* override a
user-installed package.
'';
};
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; lib.mkOrder 50 [
busybox
];
};
}

View File

@ -6,5 +6,6 @@
./wm.nix
./nix.nix
./bootnext.nix
./busybox.nix
];
}

View File

@ -16,6 +16,8 @@ in
me.enable = lib.mkDefault true;
# Enable system Nix configuration
nix.enable = lib.mkDefault true;
# busybox low-priority install
busybox.enable = lib.mkDefault true;
};
# locale settings