Rename t and replace tmux-sessionizer
All checks were successful
/ check (push) Successful in 53s

This commit is contained in:
Oliver Davies 2025-09-03 08:10:13 +01:00
parent b44bbef3e2
commit 21d9ca8737
8 changed files with 4 additions and 112 deletions

View file

@ -1,15 +0,0 @@
{ config, ... }:
{
flake.modules.nixos."nixosConfigurations/t480".home-manager.users.${config.flake.meta.owner.username} = args: {
programs.tmux-sessionizer.searchPaths =
let
inherit (args.config.xdg) userDirs;
in
[
"${userDirs.extraConfig.XDG_REPOS_DIR}:3"
"${userDirs.documents}:1"
"${args.config.home.homeDirectory}/tmp"
];
};
}

View file

@ -25,13 +25,13 @@
user_path="$XDG_REPOS_DIR/$domain/$user"
repo_path="$user_path/$name"
[[ -d "$repo_path" ]] && t "$repo_path" && exit 0
[[ -d "$repo_path" ]] && tmux-sessionizer "$repo_path" && exit 0
mkdir -pv "$repo_path"
git clone "$repo_url" "$repo_path"
t "$repo_path"
tmux-sessionizer "$repo_path"
else
exit 1
fi

View file

@ -4,9 +4,9 @@
{
home.packages = [
(pkgs.writeShellApplication {
name = "t";
name = "tmux-sessionizer";
runtimeInputs = with pkgs; [ fzf ];
runtimeInputs = with pkgs; [ coreutils fzf tmux ];
text = ''
set -euo pipefail

View file

@ -1,26 +0,0 @@
{ lib, ... }:
{
flake.modules.homeManager.base =
{ config, ... }:
{
options.programs.tmux-sessionizer = {
searchPaths = lib.mkOption {
default = [ config.home.homeDirectory ];
type = lib.types.listOf lib.types.str;
description = "List of search paths for tmux-sessionizer to use.";
};
# TODO: add TS_EXTRA_SEARCH_PATHS.
# TODO: add TS_MAX_DEPTH.
# TODO: add TS_SESSION_COMMANDS once I figure out what they're for.
};
config = {
xdg.configFile."tmux-sessionizer/tmux-sessionizer.conf".text = ''
TS_SEARCH_PATHS=(${builtins.concatStringsSep " " config.programs.tmux-sessionizer.searchPaths})
TS_SESSION_COMMANDS=(nvim .)
'';
};
};
}

View file

@ -1,7 +0,0 @@
{
flake.modules.homeManager.base =
{ pkgs, ... }:
{
home.packages = with pkgs; [ tmux-sessionizer ];
};
}