diff --git a/config/js/bunfig.toml b/config/js/bunfig.toml new file mode 100644 index 0000000..08932ab --- /dev/null +++ b/config/js/bunfig.toml @@ -0,0 +1,2 @@ +[install] +minimumReleaseAge = 604800 diff --git a/config/js/npmrc b/config/js/npmrc new file mode 100644 index 0000000..128242b --- /dev/null +++ b/config/js/npmrc @@ -0,0 +1,3 @@ +min-release-age=7 +minimum-release-age=10080 +save-exact=true diff --git a/modules/home/cli-apps/js/default.nix b/modules/home/cli-apps/js/default.nix new file mode 100644 index 0000000..685daa8 --- /dev/null +++ b/modules/home/cli-apps/js/default.nix @@ -0,0 +1,21 @@ +{ + 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; + }; +}