78 lines
2.3 KiB
Nix
78 lines
2.3 KiB
Nix
{
|
|
modules,
|
|
inputs,
|
|
...
|
|
}:
|
|
{
|
|
flake-file.inputs = {
|
|
direnv-instant.url = "github:Mic92/direnv-instant";
|
|
};
|
|
modules.fish = {
|
|
nixos = {
|
|
programs.fish.enable = true;
|
|
};
|
|
homeManager =
|
|
{ pkgs, ... }:
|
|
{
|
|
imports = [ inputs.direnv-instant.homeModules.direnv-instant ];
|
|
programs.direnv-instant.enable = true;
|
|
home.shell.enableFishIntegration = true;
|
|
home.packages = [
|
|
pkgs.nix-output-monitor
|
|
# pkgs.devenv
|
|
];
|
|
programs = {
|
|
fish = {
|
|
enable = true;
|
|
shellInit = ''
|
|
set -g theme_nerd_fonts yes
|
|
set -g theme_color_scheme nord
|
|
set -g theme_display_user yes
|
|
set -g fish_color_autosuggestion 6F6578
|
|
alias nik 'nix'
|
|
|
|
if not set -q TMUX
|
|
set -gx COLORTERM truecolor
|
|
end
|
|
'';
|
|
interactiveShellInit = ''
|
|
# direnv-instant registers its hook on both fish_prompt and PWD,
|
|
# causing double execution on every cd. Re-register on PWD only.
|
|
functions --erase _direnv_hook
|
|
function _direnv_hook --on-variable PWD
|
|
set -gx DIRENV_INSTANT_SHELL fish
|
|
set -gx DIRENV_INSTANT_SHELL_PID $fish_pid
|
|
if test "$DIRENV_INSTANT_USE_CACHE" != 0 -a -n "$__DIRENV_INSTANT_ENV_FILE" -a -f "$__DIRENV_INSTANT_ENV_FILE"
|
|
source "$__DIRENV_INSTANT_ENV_FILE"
|
|
end
|
|
direnv-instant start | source
|
|
end
|
|
'';
|
|
plugins = [
|
|
{
|
|
name = "bobthefish";
|
|
src = pkgs.fetchFromGitHub {
|
|
owner = "oh-my-fish";
|
|
repo = "theme-bobthefish";
|
|
rev = "e3b4d4eafc23516e35f162686f08a42edf844e40";
|
|
sha256 = "sha256-cXOYvdn74H4rkMWSC7G6bT4wa9d3/3vRnKed2ixRnuA=";
|
|
};
|
|
}
|
|
];
|
|
};
|
|
eza = {
|
|
enable = true;
|
|
enableFishIntegration = true;
|
|
icons = "auto";
|
|
git = true;
|
|
extraOptions = [ ];
|
|
};
|
|
direnv = {
|
|
enable = true;
|
|
enableFishIntegration = false;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|