mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-24 17:08:25 +02:00
feat: homebrew - darwin
This commit is contained in:
@@ -29,6 +29,12 @@ let
|
|||||||
# HTTP_PROXY = "http://127.0.0.1:7890";
|
# HTTP_PROXY = "http://127.0.0.1:7890";
|
||||||
# HTTPS_PROXY = "http://127.0.0.1:7890";
|
# HTTPS_PROXY = "http://127.0.0.1:7890";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
homebrew_env_script =
|
||||||
|
lib.attrsets.foldlAttrs
|
||||||
|
(acc: name: value: acc + "\nexport ${name}=${value}")
|
||||||
|
""
|
||||||
|
(homebrew_mirror_env // local_proxy_env);
|
||||||
in {
|
in {
|
||||||
# Install packages from nix's official package repository.
|
# Install packages from nix's official package repository.
|
||||||
#
|
#
|
||||||
@@ -54,17 +60,10 @@ in {
|
|||||||
// homebrew_mirror_env;
|
// homebrew_mirror_env;
|
||||||
|
|
||||||
# Set environment variables for nix-darwin before run `brew bundle`.
|
# Set environment variables for nix-darwin before run `brew bundle`.
|
||||||
system.activationScripts.homebrew.text = let
|
system.activationScripts.homebrew.text = lib.mkBefore ''
|
||||||
env_script =
|
echo >&2 '${homebrew_env_script}'
|
||||||
lib.attrsets.foldlAttrs
|
${homebrew_env_script}
|
||||||
(acc: name: value: acc + "\nexport ${name}=${value}")
|
'';
|
||||||
""
|
|
||||||
(homebrew_mirror_env // local_proxy_env);
|
|
||||||
in
|
|
||||||
lib.mkBefore ''
|
|
||||||
echo >&2 '${env_script}'
|
|
||||||
${env_script}
|
|
||||||
'';
|
|
||||||
|
|
||||||
# Create /etc/zshrc that loads the nix-darwin environment.
|
# Create /etc/zshrc that loads the nix-darwin environment.
|
||||||
# this is required if you want to use darwin's default shell - zsh
|
# this is required if you want to use darwin's default shell - zsh
|
||||||
|
|||||||
Reference in New Issue
Block a user