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:
parent
b135edbdd4
commit
ba4108e3fb
4 changed files with 21 additions and 30 deletions
|
|
@ -1,10 +1 @@
|
|||
{ mkTarget, ... }:
|
||||
mkTarget {
|
||||
config =
|
||||
{ colors, inputs }:
|
||||
{
|
||||
programs.fish.interactiveShellInit = import ./prompt.nix {
|
||||
inherit colors inputs;
|
||||
};
|
||||
};
|
||||
}
|
||||
import ./shared.nix
|
||||
|
|
|
|||
|
|
@ -1,8 +1 @@
|
|||
{ mkTarget, ... }:
|
||||
mkTarget {
|
||||
config =
|
||||
{ colors, inputs }:
|
||||
{
|
||||
programs.fish.promptInit = import ./prompt.nix { inherit colors inputs; };
|
||||
};
|
||||
}
|
||||
import ./shared.nix
|
||||
|
|
|
|||
|
|
@ -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
19
modules/fish/shared.nix
Normal 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
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue