diff --git a/home/modules/tmux-sessionizer.nix b/home/modules/tmux-sessionizer.nix index 65e9556..01c10c3 100644 --- a/home/modules/tmux-sessionizer.nix +++ b/home/modules/tmux-sessionizer.nix @@ -11,6 +11,19 @@ in snowhawk.tmux.sessionizer = { enable = lib.mkEnableOption "tmux-sessionizer home-manager module"; + paths = lib.mkOption { + type = with lib.types; listOf str; + description = '' + list of paths to select with tmux-sessionizer + ''; + default = [ ]; + example = [ + "~" + "~/projects" + "~/src" + ]; + }; + pkg = lib.mkOption { type = lib.types.package; description = '' @@ -35,7 +48,7 @@ in if [[ $# -eq 1 ]]; then selected=$1 else - selected=$(${find} -L ~/projects ~/ ~/.config ~/src -mindepth 1 -maxdepth 1 -type d | ${fzf}) + selected=$(${find} -L ${lib.escapeShellArgs cfg.paths} -mindepth 1 -maxdepth 1 -type d | ${fzf}) fi if [[ -z $selected ]]; then