feat(home-manager): add support for fish (#46)
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
parent
7513e5edf8
commit
5713b478b1
2 changed files with 33 additions and 0 deletions
|
@ -15,6 +15,7 @@ in
|
|||
./bat.nix
|
||||
./bottom.nix
|
||||
./btop.nix
|
||||
./fish.nix
|
||||
./kitty.nix
|
||||
./lazygit.nix
|
||||
./starship.nix
|
||||
|
|
32
modules/home-manager/fish.nix
Normal file
32
modules/home-manager/fish.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{ config
|
||||
, pkgs
|
||||
, lib
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
inherit (lib) ctp mkIf;
|
||||
cfg = config.programs.fish.catppuccin;
|
||||
enable = cfg.enable && config.programs.fish.enable;
|
||||
|
||||
theme = pkgs.fetchFromGitHub
|
||||
{
|
||||
owner = "catppuccin";
|
||||
repo = "fish";
|
||||
rev = "91e6d6721362be05a5c62e235ed8517d90c567c9";
|
||||
sha256 = "sha256-l9V7YMfJWhKDL65dNbxaddhaM6GJ0CFZ6z+4R6MJwBA=";
|
||||
};
|
||||
themeName = "Catppuccin ${ctp.mkUpper cfg.flavour}";
|
||||
in
|
||||
{
|
||||
options.programs.fish.catppuccin = lib.ctp.mkCatppuccinOpt "fish" config;
|
||||
|
||||
# xdg is required for this to work
|
||||
config = mkIf enable {
|
||||
xdg.enable = lib.mkForce true;
|
||||
|
||||
programs.fish.shellInit = ''
|
||||
fish_config theme choose "${themeName}"
|
||||
'';
|
||||
xdg.configFile."fish/themes/${themeName}.theme".source = "${theme}/themes/${themeName}.theme";
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue