mirror of
https://github.com/nmasur/dotfiles
synced 2026-07-07 00:53:57 +00:00
switch from nix-darwin control to more home-manager darwin settings
This commit is contained in:
@@ -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;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user