Skip to content

Commit

Permalink
fix(fzf): Fix paths
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjones2014 committed Jun 12, 2024
1 parent edd8172 commit c78ee39
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions modules/home-manager/fzf.nix
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
{ config, lib, ... }:
let cfg = config.programs.fzf.tokyonight;
let
cfg = config.programs.fzf.tokyonight;
themes = {
day = builtins.readFile ../../resources/fzf/tokyonight_day.sh;
night = builtins.readFile ../../resources/fzf/tokyonight_night.sh;
moon = builtins.readFile ../../resources/fzf/tokyonight_moon.sh;
storm = builtins.readFile ../../resources/fzf/tokyonight_storm.sh;
};
in {
options.programs.fzf.tokyonight = lib.tn.mkTokyonightOpt "tokyonight fzf";
config = lib.mkMerge [
(lib.mkIf cfg.enable {
programs = {
programs = let shell_theme = themes.${cfg.style};
in {
# these are .zsh files, but the syntax is compatible
fish.interactiveShellInit =
builtins.readFile ../../resources/fzf/tokyonight_${cfg.style}.sh;
bash.initExtra =
builtins.readFile ../../resources/fzf/tokyonight_${cfg.style}.sh;
zsh.initExtra =
builtins.readFile ../../resources/fzf/tokyonight_${cfg.style}.sh;
fish.interactiveShellInit = shell_theme;
bash.initExtra = shell_theme;
zsh.initExtra = shell_theme;
};
})
];
Expand Down

0 comments on commit c78ee39

Please sign in to comment.