nixcfg/modules/home/cli-apps/js/default.nix
Harald Hoyer b5ae777a4a feat(home/js): deploy ~/.npmrc and ~/.bunfig.toml everywhere
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.
2026-05-15 08:41:56 +02:00

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;
};
}