add some initial stuff

This commit is contained in:
Lucy Hochkamp 2025-03-15 15:45:30 +01:00
commit 62df62c3aa
No known key found for this signature in database
23 changed files with 2101 additions and 0 deletions

33
modules/cli/fish.nix Normal file
View 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;
};
}