nix-config/modules/scripts/start-tmux.nix
Oliver Davies cf9f61187f
All checks were successful
/ check (push) Successful in 1m21s
Update z, shorten commands
Signed-off-by: Oliver Davies <oliver@oliverdavies.uk>
2025-10-27 00:13:15 +00:00

33 lines
617 B
Nix

{ inputs, withSystem, ... }:
let
name = "start-tmux";
in
{
perSystem =
{ pkgs, ... }:
{
packages.${name} = pkgs.writeShellApplication {
inherit name;
runtimeInputs = with pkgs; [
fzf
inputs.z.packages.${pkgs.system}.default
];
text = ''
selected="$(z tmux list | fzf)"
[[ -n $selected ]] && z tmux connect "$selected"
'';
};
};
flake.modules.homeManager.base =
{ pkgs, ... }:
{
home.packages = [
(withSystem pkgs.system (psArgs: psArgs.config.packages.${name}))
];
};
}