yarn: add module (#7526)

This commit is contained in:
Friedrich Altheide 2025-07-23 17:42:37 +02:00 committed by GitHub
parent b4752b0eda
commit e9c599e40c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 91 additions and 0 deletions

View file

@ -0,0 +1,4 @@
{
yarn = ./example-config.nix;
yarn-empty-config = ./empty-config.nix;
}

View file

@ -0,0 +1,12 @@
{
programs.yarn = {
settings = {
httpProxy = "http://proxy.example.org:3128";
httpsProxy = "http://proxy.example.org:3128";
};
};
nmt.script = ''
assertPathNotExists home-files/.yarnrc.yml
'';
}

View file

@ -0,0 +1,20 @@
{
programs.yarn = {
enable = true;
settings = {
httpProxy = "http://proxy.example.org:3128";
httpsProxy = "http://proxy.example.org:3128";
};
};
nmt.script =
let
configPath = "home-files/.yarnrc.yml";
in
''
assertFileExists ${configPath}
assertFileContent ${configPath} \
${./example-config.yml}
'';
}

View file

@ -0,0 +1,2 @@
httpProxy: http://proxy.example.org:3128
httpsProxy: http://proxy.example.org:3128