fish module
This commit is contained in:
parent
1e87bd7221
commit
1e7079e54c
3 changed files with 28 additions and 18 deletions
1
home.nix
1
home.nix
|
@ -4,7 +4,6 @@
|
|||
imports = [
|
||||
./home/modules
|
||||
./home/modules/git.nix
|
||||
./home/modules/fish.nix
|
||||
];
|
||||
|
||||
# Home Manager needs a bit of information about you and the paths it should
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
{ ... }:
|
||||
{ lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
./neovim.nix
|
||||
./alacritty.nix
|
||||
./fish.nix
|
||||
];
|
||||
|
||||
snowhawk.fish.enable = lib.mkDefault true;
|
||||
}
|
||||
|
|
|
@ -1,21 +1,29 @@
|
|||
{ pkgs, inputs, ... }:
|
||||
{ pkgs, inputs, config, lib, ... }:
|
||||
let
|
||||
cfg = config.snowhawk.fish;
|
||||
in
|
||||
{
|
||||
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
|
||||
'';
|
||||
options.snowhawk.fish = {
|
||||
enable = lib.mkEnableOption "fish";
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
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
|
||||
'';
|
||||
};
|
||||
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
interactiveShellInit =
|
||||
builtins.readFile "${inputs.fish_theme}/fish_prompt.fish" + "\n" +
|
||||
builtins.readFile ../fish/config.fish
|
||||
;
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
interactiveShellInit =
|
||||
builtins.readFile "${inputs.fish_theme}/fish_prompt.fish" + "\n" +
|
||||
builtins.readFile ../fish/config.fish
|
||||
;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue