add some initial stuff
This commit is contained in:
commit
62df62c3aa
23 changed files with 2101 additions and 0 deletions
33
modules/cli/fish.nix
Normal file
33
modules/cli/fish.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.xyno.cli.fish;
|
||||
in
|
||||
{
|
||||
options.xyno.cli.fish.enable = lib.mkEnableOption "enable the fish shell with xynos config";
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.bash = {
|
||||
# auto spawn fish if interactive
|
||||
interactiveShellInit = ''
|
||||
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
|
||||
'';
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
fishPlugins.grc
|
||||
grc
|
||||
];
|
||||
programs.direnv.enableFishIntegration = true;
|
||||
programs.fish.interactiveShellInit = ''
|
||||
set -g fish_key_bindings fish_vi_key_bindings
|
||||
'';
|
||||
programs.fish.enable = true;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue