mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-07-07 13:25:11 +02:00
@@ -1,9 +1,14 @@
|
|||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
# 1. make `npm install -g <pkg>` happey
|
# make `npm install -g <pkg>` happey
|
||||||
# 2. set min-release-age(in days) for security
|
# npm - set min-release-age(in days) for supply-chain security
|
||||||
home.file.".npmrc".text = ''
|
home.file.".npmrc".text = ''
|
||||||
prefix=${config.home.homeDirectory}/.npm
|
prefix=${config.home.homeDirectory}/.npm
|
||||||
min-release-age=2
|
min-release-age=2
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# npm - set min release age (in minutes) for supply-chain security
|
||||||
|
xdg.configFile."pnpm/config.yaml".text = ''
|
||||||
|
minimumReleaseAge: 2880
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,14 @@
|
|||||||
_: {
|
_: {
|
||||||
# use mirror for pip install
|
# use pypi mirror
|
||||||
|
# filter packages via upload time for supply-chain security
|
||||||
xdg.configFile."pip/pip.conf".text = ''
|
xdg.configFile."pip/pip.conf".text = ''
|
||||||
[global]
|
[global]
|
||||||
index-url = https://mirrors.bfsu.edu.cn/pypi/web/simple
|
index-url = https://mirrors.bfsu.edu.cn/pypi/web/simple
|
||||||
|
|
||||||
|
[install]
|
||||||
|
uploaded-prior-to = P2D
|
||||||
|
'';
|
||||||
|
xdg.configFile."uv/uv.toml".text = ''
|
||||||
|
exclude-newer = "2 days"
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user