tmuxinator: move to dedicated module with projects support

Extract tmuxinator from tmux.nix into its own programs/tmuxinator.nix
module. The new module adds:

- programs.tmux.tmuxinator.package for customising the tmuxinator package
- programs.tmux.tmuxinator.projects for declaring projects declaratively;
  each project is written to $HOME/.config/tmuxinator/<name>.yaml

Co-authored-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
Benedikt Ritter 2026-03-23 08:55:03 +01:00 committed by Austin Horstman
parent a7d2aca3f0
commit b399348e9d
7 changed files with 129 additions and 5 deletions

View file

@ -0,0 +1,40 @@
{
config = {
programs.tmux = {
enable = true;
tmuxinator = {
enable = true;
projects = {
myproject = {
name = "myproject";
root = "~/code/myproject";
windows = [
{
editor = {
layout = "main-vertical";
panes = [
{ editor = [ "vim" ]; }
"guard"
];
};
}
{ server = "bundle exec rails s"; }
{ logs = "tail -f log/development.log"; }
];
};
my-second-project = {
name = "my-second-project";
root = "~/code/my-second-project";
};
};
};
};
nmt.script = ''
assertFileExists home-files/.config/tmuxinator/myproject.yaml
assertFileContent home-files/.config/tmuxinator/myproject.yaml ${./tmuxinator-projects-1.yaml}
assertFileExists home-files/.config/tmuxinator/my-second-project.yaml
assertFileContent home-files/.config/tmuxinator/my-second-project.yaml ${./tmuxinator-projects-2.yaml}
'';
};
}