Skip to content

fix(shell): set programs.fish.enable when cfg.fish.enable is true#128

Merged
richen604 merged 9 commits intorichen604:mainfrom
stoutpanda:fix/fish-enable
Jul 5, 2025
Merged

fix(shell): set programs.fish.enable when cfg.fish.enable is true#128
richen604 merged 9 commits intorichen604:mainfrom
stoutpanda:fix/fish-enable

Conversation

@stoutpanda
Copy link
Copy Markdown
Contributor

Added conditional check and enable in /hydenix/modules/hm/shell.nix

Description

Found that on a new install fish.pkg was not being installed when enabling it. Added conditional check for the option and enabled the package if the user uses the fish.enable option in shell.nix. Followed the existing zsh implementation style in the same file.

Type of change

Bug fix as nix-rebuild will not work if the fish pkg is not enabled somewhere.

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • [x ] My commits follow conventional commit format
  • [x ] My changes generate no new warnings

Added conditional check and enable in  /hydenix/modules/hm/shell.nix
@richen604
Copy link
Copy Markdown
Owner

what is the default fish file that is created when the home-manager module is enabled? does it conflict with hyde defaults?
image

im assuming it makes a config.fish so please include the content from hyde config.fish

Add conditional fastfetch display to fish shell's interactiveShellInit
section, matching the existing zsh implementation. Fastfetch will only
run when cfg.fastfetch.enable is true.
- Add eza to fish packages list to support fish aliases
- eza is used for directory listing aliases in Hyde's fish config
- Ensures consistency with zsh configuration which already includes eza
Remove duplicate package declarations when both zsh and fish are enabled.
Also removed unneeded fzf pkg as it is declared elsewhere in hydenix.
Home Manager's programs.fish module generates and manages config.fish.
Direct file copying causes conflicts. This is step 1 of proper fish
integration with Home Manager.
Add the eza-based directory listing aliases (l, ls, ll, ld, lt) and
the vc alias for VS Code. These are the exact aliases from Hyde's
original config.fish.
Add conditional initialization for:
- Starship prompt with proper environment variables
- Pokego ASCII art (when enabled)
- Fastfetch system info (when enabled)
- Source hyde_config.fish for additional Hyde customizations

All features respect their respective enable flags.
Add `set -g fish_greeting` to disable the default fish greeting,
matching Hyde's original config.fish behavior.
@stoutpanda
Copy link
Copy Markdown
Contributor Author

Thank you for the direction. After reviewing home-manage fish module, and utilizing the options seems to be the best way to mitigate the conflict you identified. I need to do more testing before updating the PR, but would appreciate feedback on if this approach is appropriate with your vision for this project or you would prefer a different implementation.

Branch on my fork:

HyDE config.fish

Thank you for all your efforts and apologies for the extra review request.

@richen604
Copy link
Copy Markdown
Owner

looks good!
last thing would be to remove the home.file for config.fish

".config/fish/config.fish".source = "${pkgs.hydenix.hyde}/Configs/.config/fish/config.fish";

Copy link
Copy Markdown
Owner

@richen604 richen604 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great, ready to merge?

@stoutpanda
Copy link
Copy Markdown
Contributor Author

stoutpanda commented Jul 4, 2025

Good to merge. Looks good on my laptop and a vm with fish as default shell. Thanks for the help!

@richen604 richen604 merged commit 27e4dc4 into richen604:main Jul 5, 2025
2 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jul 5, 2025

🎉 This PR is included in version 4.6.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants