nix-config/modules/scripts/tmux-default-startup.nix
Oliver Davies 2c5f5f266f Remove build and build-adoc
Signed-off-by: Oliver Davies <oliver@oliverdavies.uk>
2025-10-27 23:03:23 +00:00

36 lines
648 B
Nix

{ withSystem, ... }:
let
name = "tmux-default-startup";
in
{
perSystem =
{ pkgs, ... }:
{
packages.${name} = pkgs.writeShellApplication {
inherit name;
text = ''
if [[ -x "$PWD/.tmux-sessionizer" ]]; then
"$PWD/.tmux-sessionizer"
fi
if [[ -x "$PWD/.tmux" ]]; then
"$PWD/.tmux"
fi
tmux new-window -d -n scratch
"$EDITOR"
'';
};
};
flake.modules.homeManager.base =
{ pkgs, ... }:
{
home.packages = [
(withSystem pkgs.system (psArgs: psArgs.config.packages.${name}))
];
};
}