1

Modules/Fish: Add nix-darwin homebrew environment setup

This commit is contained in:
2026-03-21 15:49:17 +01:00
parent 645fc64ead
commit 63afac3d04
2 changed files with 19 additions and 7 deletions

View File

@ -45,6 +45,18 @@ in {
programs.fish = lib.mkMerge [
# Darwin exclusive config
(lib.mkIf pkgs.stdenv.isDarwin {
shellInit = ''
set fish_greeting
yes | fish_config theme save "system-theme"
set --global --export HOMEBREW_PREFIX "/opt/homebrew"
set --global --export HOMEBREW_CELLAR "/opt/homebrew/Cellar"
set --global --export HOMEBREW_REPOSITORY "/opt/homebrew"
fish_add_path --global --move --path "/opt/homebrew/bin" "/opt/homebrew/sbin"
if test -n "$MANPATH[1]"; set --global --export MANPATH ''' $MANPATH; end;
if not contains "/opt/homebrew/share/info" $INFOPATH; set --global --export INFOPATH "/opt/homebrew/share/info" $INFOPATH; end;
'';
shellAbbrs = let
# These can be used for my config.homemodules and for HM config.programs,
# as both of these add the package to home.packages
@ -66,6 +78,11 @@ in {
(lib.mkIf pkgs.stdenv.isLinux {
generateCompletions = nixosConfig.programs.fish.generateCompletions;
shellInit = ''
set fish_greeting
yes | fish_config theme save "system-theme"
'';
functions = lib.mergeAttrsList [
(lib.optionalAttrs config.homemodules.nnn.enable {
nnncd = {
@ -228,11 +245,6 @@ in {
];
plugins = [];
shellInit = ''
set fish_greeting
yes | fish_config theme save "system-theme"
'';
}
];

View File

@ -61,8 +61,8 @@
};
power = {
restartAfterFreeze = false;
restartAfterPowerFailure = false;
# restartAfterFreeze = false;
# restartAfterPowerFailure = false;
sleep = {
computer = 10; # 10 minutes until sleep