55 lines
1.3 KiB
Nix
55 lines
1.3 KiB
Nix
# macOS-specific home-manager configuration
|
|
{
|
|
inputs,
|
|
lib,
|
|
config,
|
|
pkgs,
|
|
...
|
|
}: lib.mkIf pkgs.stdenv.isDarwin {
|
|
# macOS-specific packages
|
|
home.packages = with pkgs; [
|
|
# macOS CLI tools
|
|
# m-cli # Swiss Army Knife for macOS
|
|
|
|
# GUI applications (if you want to manage them with nix)
|
|
# Note: Many prefer to use homebrew for GUI apps on macOS
|
|
];
|
|
|
|
# macOS-specific configurations
|
|
home.sessionVariables = {
|
|
# Fix for Nix on macOS
|
|
NIX_PATH = "nixpkgs=${inputs.nixpkgs}:darwin=${inputs.darwin}";
|
|
};
|
|
|
|
# Fish shell configuration for macOS
|
|
programs.fish = lib.mkIf config.programs.fish.enable {
|
|
shellInit = ''
|
|
# Add Homebrew to PATH if it exists
|
|
if test -d /opt/homebrew/bin
|
|
fish_add_path /opt/homebrew/bin
|
|
end
|
|
'';
|
|
};
|
|
|
|
# Zsh configuration for macOS
|
|
programs.zsh = lib.mkIf config.programs.zsh.enable {
|
|
initExtra = ''
|
|
# Add Homebrew to PATH if it exists
|
|
if [[ -d /opt/homebrew/bin ]]; then
|
|
eval "$(/opt/homebrew/bin/brew shellenv)"
|
|
fi
|
|
'';
|
|
};
|
|
|
|
# Bash configuration for macOS
|
|
programs.bash = lib.mkIf config.programs.bash.enable {
|
|
initExtra = ''
|
|
# Add Homebrew to PATH if it exists
|
|
if [[ -d /opt/homebrew/bin ]]; then
|
|
eval "$(/opt/homebrew/bin/brew shellenv)"
|
|
fi
|
|
'';
|
|
};
|
|
}
|
|
|