switch from nix-darwin control to more home-manager darwin settings

This commit is contained in:
Noah Masur
2026-07-05 14:34:43 -06:00
parent e0fb590314
commit 35d40ca346
14 changed files with 505 additions and 106 deletions
@@ -13,13 +13,35 @@ in
options.nmasur.presets.programs.fish-darwin.enable = lib.mkEnableOption {
description = "Fish macOS options";
default = config.nmasur.presets.programs.fish && pkgs.stdenv.isDarwin;
};
config = lib.mkIf cfg.enable {
programs.fish.shellAbbrs = {
# Shortcut to edit hosts file
hosts = "sudo nvim /etc/hosts";
# Default shell setting doesn't work
home.sessionVariables = {
SHELL = "${pkgs.fish}/bin/fish";
};
programs.fish = {
shellAbbrs = {
# Shortcut to edit hosts file
hosts = "sudo hx /etc/hosts";
};
shellInit = ''
set -g __nixos_path_original $PATH
function __nixos_path_fix -d "fix PATH value"
set -l result (string split ":" $__nixos_path_original)
for elt in $PATH
if not contains -- $elt $result
set -a result $elt
end
end
set -g PATH $result
end
__nixos_path_fix
'';
# # Speeds up fish launch time on macOS
# useBabelfish = true;
};
};
}