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:
parent
a7d2aca3f0
commit
b399348e9d
7 changed files with 129 additions and 5 deletions
40
tests/modules/programs/tmux/tmuxinator-projects.nix
Normal file
40
tests/modules/programs/tmux/tmuxinator-projects.nix
Normal 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}
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue