Skip to content

Commit

Permalink
Enable nix and home-manager in fish
Browse files Browse the repository at this point in the history
  • Loading branch information
kachick committed Jul 14, 2023
1 parent cdd57b3 commit 210ee24
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 3 deletions.
1 change: 1 addition & 0 deletions .config/fish/conf.d/plugin-foreign-env.fish
3 changes: 0 additions & 3 deletions .config/fish/config.fish

This file was deleted.

1 change: 1 addition & 0 deletions .config/fish/config.fish
32 changes: 32 additions & 0 deletions .config/home-manager/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,38 @@
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;

programs.fish = {
enable = true;

shellInit =
''
# nix
if test -e "$HOME/.nix-profile/etc/profile.d/nix.sh"
fenv source "$HOME/.nix-profile/etc/profile.d/nix.sh"
end
# home-manager
if test -e "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"
fenv source "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"
end
# starship
if status is-interactive
starship init fish | source
end
'';

plugins = [{
name = "foreign-env";
src = pkgs.fetchFromGitHub {
owner = "oh-my-fish";
repo = "plugin-foreign-env";
rev = "3ee95536106c11073d6ff466c1681cde31001383";
sha256 = "sha256-vyW/X2lLjsieMpP9Wi2bZPjReaZBkqUbkh15zOi8T4Y=";
};
}];
};

# TODO: Consider to manage nix.conf with home-manager. However it includes`trusted-public-keys`
# nix.package = pkgs.nix;
# nix.settings = {
Expand Down

0 comments on commit 210ee24

Please sign in to comment.