New metacfg.cli-apps.js module (enabled by default) pins minimum release ages for npm and bun across all home configurations, so the mitigation against newly published malicious packages applies uniformly rather than living as untracked dotfiles on one machine.
21 lines
399 B
Nix
21 lines
399 B
Nix
{
|
|
lib,
|
|
config,
|
|
...
|
|
}:
|
|
let
|
|
inherit (lib) mkIf;
|
|
inherit (lib.metacfg) mkBoolOpt;
|
|
|
|
cfg = config.metacfg.cli-apps.js;
|
|
in
|
|
{
|
|
options.metacfg.cli-apps.js = {
|
|
enable = mkBoolOpt true "Enable npm and bun config.";
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
home.file.".npmrc".source = ../../../../config/js/npmrc;
|
|
home.file.".bunfig.toml".source = ../../../../config/js/bunfig.toml;
|
|
};
|
|
}
|