mirror of
https://github.com/nickolaj-jepsen/nixos.git
synced 2026-01-22 08:06:50 +01:00
initial commit
This commit is contained in:
commit
b5febd4395
11 changed files with 861 additions and 0 deletions
42
home-manager/modules/fish/default.nix
Normal file
42
home-manager/modules/fish/default.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
home.file."${config.home.homeDirectory}/.config/fish/conf.d/" = { source = ./conf.d; recursive = true;};
|
||||
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
plugins = with pkgs.fishPlugins; [
|
||||
{
|
||||
name = "fzf";
|
||||
src = fzf.src;
|
||||
}
|
||||
{
|
||||
name = "bobthefish";
|
||||
src = bobthefish.src;
|
||||
}
|
||||
{
|
||||
name = "to";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "joehillen";
|
||||
repo = "to-fish";
|
||||
rev = "52b151cfe67c00cb64d80ccc6dae398f20364938";
|
||||
hash = "sha256-DfDsU/qY2XdYlkLISIOv02ggHfKEpb+YompNWWjs5/A=";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
# Init fish from bash
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
initExtra = ''
|
||||
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
|
||||
then
|
||||
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
|
||||
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
|
||||
fi
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue