mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-24 01:38:28 +02:00
fix(darwin): nix-darwin - activation option & zsh option
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
export PATH="$PATH:/opt/homebrew/bin:/usr/local/bin"
|
export PATH="$PATH:/opt/homebrew/bin:/usr/local/bin"
|
||||||
'';
|
'';
|
||||||
# copied from the content generated by `conda init bash`
|
# copied from the content generated by `conda init bash`
|
||||||
initExtra = ''
|
initContent = ''
|
||||||
arch=$(uname -m)
|
arch=$(uname -m)
|
||||||
|
|
||||||
if [ "aarch64" = "$arch" ] || [ "arm64" = "$arch" ]; then
|
if [ "aarch64" = "$arch" ] || [ "arm64" = "$arch" ]; then
|
||||||
@@ -28,10 +28,10 @@ in {
|
|||||||
# in /opt/homebrew for Apple Silicon and /usr/local for Rosetta 2 to coexist and use bottles.
|
# in /opt/homebrew for Apple Silicon and /usr/local for Rosetta 2 to coexist and use bottles.
|
||||||
programs.bash = {
|
programs.bash = {
|
||||||
enable = true;
|
enable = true;
|
||||||
bashrcExtra = lib.mkAfter (envExtra + initExtra);
|
bashrcExtra = lib.mkAfter (envExtra + initContent);
|
||||||
};
|
};
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
inherit envExtra initExtra;
|
inherit envExtra initContent;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{pkgs, ...}:
|
{pkgs, myvars, ...}:
|
||||||
###################################################################################
|
###################################################################################
|
||||||
#
|
#
|
||||||
# macOS's System configuration
|
# macOS's System configuration
|
||||||
@@ -22,12 +22,7 @@
|
|||||||
time.timeZone = "Asia/Shanghai";
|
time.timeZone = "Asia/Shanghai";
|
||||||
|
|
||||||
system = {
|
system = {
|
||||||
# activationScripts are executed every time you boot the system or run `nixos-rebuild` / `darwin-rebuild`.
|
primaryUser = myvars.username;
|
||||||
activationScripts.postUserActivation.text = ''
|
|
||||||
# activateSettings -u will reload the settings from the database and apply them to the current session,
|
|
||||||
# so we do not need to logout and login again to make the changes take effect.
|
|
||||||
/System/Library/PrivateFrameworks/SystemAdministration.framework/Resources/activateSettings -u
|
|
||||||
'';
|
|
||||||
|
|
||||||
defaults = {
|
defaults = {
|
||||||
menuExtraClock.Show24Hour = true; # show 24 hour clock
|
menuExtraClock.Show24Hour = true; # show 24 hour clock
|
||||||
|
|||||||
Reference in New Issue
Block a user