nix-config/modules/scripts/start-tmux.nix
Oliver Davies a1b3975f39
All checks were successful
/ check (push) Successful in 48s
Replace zet with the z monolith
Signed-off-by: Oliver Davies <oliver@oliverdavies.uk>
2025-10-24 23:31:00 +01:00

33 lines
633 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 session list | fzf)"
[[ -n $selected ]] && z tmux session connect "$selected"
'';
};
};
flake.modules.homeManager.base =
{ pkgs, ... }:
{
home.packages = [
(withSystem pkgs.system (psArgs: psArgs.config.packages.${name}))
];
};
}