fish: unify NixOS and Home Manager configurations (#2108)

Link: https://github.com/nix-community/stylix/pull/2108

Reviewed-by: 0xda157 <da157@voidq.com>
Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
This commit is contained in:
Manuel Mendez 2026-01-05 12:11:33 -05:00 committed by GitHub
parent b135edbdd4
commit ba4108e3fb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 21 additions and 30 deletions

View file

@ -1,10 +1 @@
{ mkTarget, ... }:
mkTarget {
config =
{ colors, inputs }:
{
programs.fish.interactiveShellInit = import ./prompt.nix {
inherit colors inputs;
};
};
}
import ./shared.nix

View file

@ -1,8 +1 @@
{ mkTarget, ... }:
mkTarget {
config =
{ colors, inputs }:
{
programs.fish.promptInit = import ./prompt.nix { inherit colors inputs; };
};
}
import ./shared.nix

View file

@ -1,12 +0,0 @@
{ colors, inputs }:
let
theme = colors { templateRepo = inputs.base16-fish; };
in
''
source ${theme}
# See https://github.com/tomyun/base16-fish/issues/7 for why this condition exists
if status --is-interactive && test -z "$TMUX"
base16-${colors.slug}
end
''

19
modules/fish/shared.nix Normal file
View file

@ -0,0 +1,19 @@
{ mkTarget, ... }:
mkTarget {
config =
{ colors, inputs }:
{
programs.fish.interactiveShellInit =
let
theme = colors { templateRepo = inputs.base16-fish; };
in
''
source ${theme}
# See https://github.com/tomyun/base16-fish/issues/7 for why this condition exists
if test -z $TMUX
base16-${colors.slug}
end
'';
};
}