stylix/modules/fish.nix

30 lines
686 B
Nix
Raw Normal View History

{ pkgs, config, lib, ... }:
2020-12-20 20:12:20 +00:00
let
theme = config.lib.stylix.colors {
templateRepo = pkgs.fetchFromGitHub {
owner = "tomyun";
repo = "base16-fish";
rev = "7f647967fddedaf803191bc9113b13d2071dc3cf";
sha256 = "IGUbLjsmmAvB9UKGkR7oqdpjeVEfzt83GpyBkrZf2O4=";
};
2020-12-20 20:12:20 +00:00
};
promptInit = ''
source ${theme}
base16-${config.lib.stylix.colors.slug}
2020-12-20 20:12:20 +00:00
'';
in {
options.stylix.targets.fish.enable =
config.lib.stylix.mkEnableTarget "Fish" true;
2020-12-20 20:12:20 +00:00
config = lib.mkIf config.stylix.targets.fish.enable {
programs.fish.promptInit = promptInit;
home-manager.sharedModules = [{
programs.fish.interactiveShellInit = promptInit;
}];
};
2020-12-20 20:12:20 +00:00
}