-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split nix definitions by the shells and packages (#223)
* Split nix definitions by the shells and packages * Refactor with the specific files * Add an empty commit
- Loading branch information
Showing
5 changed files
with
297 additions
and
284 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{ pkgs, ... }: | ||
|
||
{ | ||
xdg.configFile."fish/fish_variables".source = ../fish/fish_variables; | ||
xdg.configFile."fish/functions/fish_prompt.fish".source = ../fish/functions/fish_prompt.fish; | ||
|
||
programs.fish = { | ||
enable = true; | ||
|
||
shellInit = | ||
'' | ||
switch (uname -s) | ||
case Linux | ||
# Keep this comment | ||
case Darwin | ||
# nix | ||
# https://github.com/NixOS/nix/issues/2280 | ||
if test -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' | ||
fenv source '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' | ||
end | ||
case FreeBSD NetBSD DragonFly | ||
# Keep this comment | ||
case '*' | ||
# Keep this comment | ||
end | ||
# 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="; | ||
}; | ||
}]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.