fish: use mkTarget
This commit is contained in:
parent
af11435723
commit
18211a9f41
3 changed files with 23 additions and 22 deletions
|
|
@ -1,10 +1,13 @@
|
|||
{ config, lib, ... }:
|
||||
{ mkTarget, ... }:
|
||||
mkTarget {
|
||||
name = "fish";
|
||||
humanName = "Fish";
|
||||
|
||||
{
|
||||
options.stylix.targets.fish.enable =
|
||||
config.lib.stylix.mkEnableTarget "Fish" true;
|
||||
|
||||
config = lib.mkIf (config.stylix.enable && config.stylix.targets.fish.enable) {
|
||||
programs.fish.interactiveShellInit = import ./prompt.nix config;
|
||||
};
|
||||
configElements =
|
||||
{ colors, inputs }:
|
||||
{
|
||||
programs.fish.interactiveShellInit = import ./prompt.nix {
|
||||
inherit colors inputs;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
{ config, lib, ... }:
|
||||
{ mkTarget, ... }:
|
||||
mkTarget {
|
||||
name = "fish";
|
||||
humanName = "Fish";
|
||||
|
||||
{
|
||||
options.stylix.targets.fish.enable =
|
||||
config.lib.stylix.mkEnableTarget "Fish" true;
|
||||
|
||||
config = lib.mkIf (config.stylix.enable && config.stylix.targets.fish.enable) {
|
||||
programs.fish.promptInit = import ./prompt.nix config;
|
||||
};
|
||||
configElements =
|
||||
{ colors, inputs }:
|
||||
{
|
||||
programs.fish.promptInit = import ./prompt.nix { inherit colors inputs; };
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,12 @@
|
|||
config:
|
||||
|
||||
{ colors, inputs }:
|
||||
let
|
||||
theme = config.lib.stylix.colors {
|
||||
templateRepo = config.stylix.inputs.base16-fish;
|
||||
};
|
||||
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-${config.lib.stylix.colors.slug}
|
||||
base16-${colors.slug}
|
||||
end
|
||||
''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue