programs.tmux: use xdg config path (#1928)
Tmux 3.2 includes support to use `$XDG_CONFIG_HOME/tmux/tmux.conf` as well as `~/.config/tmux/tmux.conf` for configuration file.
This commit is contained in:
parent
26fa84ebce
commit
e00dd0d7d2
|
@ -109,7 +109,7 @@ let
|
|||
}
|
||||
)];
|
||||
|
||||
home.file.".tmux.conf".text = ''
|
||||
xdg.configFile."tmux/tmux.conf".text = ''
|
||||
# ============================================= #
|
||||
# Load plugins with Home Manager #
|
||||
# --------------------------------------------- #
|
||||
|
@ -335,10 +335,9 @@ in
|
|||
};
|
||||
})
|
||||
|
||||
# config file ~/.tmux.conf
|
||||
{ home.file.".tmux.conf".text = mkBefore tmuxConf; }
|
||||
{ xdg.configFile."tmux/tmux.conf".text = mkBefore tmuxConf; }
|
||||
(mkIf (cfg.plugins != []) configPlugins)
|
||||
{ home.file.".tmux.conf".text = mkAfter cfg.extraConfig; }
|
||||
{ xdg.configFile."tmux/tmux.conf".text = mkAfter cfg.extraConfig; }
|
||||
])
|
||||
);
|
||||
}
|
||||
|
|
|
@ -19,8 +19,8 @@ in {
|
|||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.tmux.conf
|
||||
assertFileContent home-files/.tmux.conf \
|
||||
assertFileExists home-files/.config/tmux/tmux.conf
|
||||
assertFileContent home-files/.config/tmux/tmux.conf \
|
||||
${substituteExpected ./default-shell.conf}
|
||||
'';
|
||||
};
|
||||
|
|
|
@ -18,8 +18,8 @@ with lib;
|
|||
];
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.tmux.conf
|
||||
assertFileContent home-files/.tmux.conf \
|
||||
assertFileExists home-files/.config/tmux/tmux.conf
|
||||
assertFileContent home-files/.config/tmux/tmux.conf \
|
||||
${./disable-confirmation-prompt.conf}
|
||||
'';
|
||||
};
|
||||
|
|
|
@ -42,8 +42,10 @@ with lib;
|
|||
];
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.tmux.conf
|
||||
assertFileContent home-files/.tmux.conf ${./emacs-with-plugins.conf}
|
||||
assertFileExists home-files/.config/tmux/tmux.conf
|
||||
assertFileContent home-files/.config/tmux/tmux.conf ${
|
||||
./emacs-with-plugins.conf
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ with lib;
|
|||
programs.tmux = { enable = false; };
|
||||
|
||||
nmt.script = ''
|
||||
assertPathNotExists home-files/.tmux.conf
|
||||
assertPathNotExists home-files/.config/tmux/tmux.conf
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -18,8 +18,8 @@ with lib;
|
|||
];
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.tmux.conf
|
||||
assertFileContent home-files/.tmux.conf \
|
||||
assertFileExists home-files/.config/tmux/tmux.conf
|
||||
assertFileContent home-files/.config/tmux/tmux.conf \
|
||||
${./prefix.conf}
|
||||
'';
|
||||
};
|
||||
|
|
|
@ -19,8 +19,8 @@ with lib;
|
|||
];
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.tmux.conf
|
||||
assertFileContent home-files/.tmux.conf \
|
||||
assertFileExists home-files/.config/tmux/tmux.conf
|
||||
assertFileContent home-files/.config/tmux/tmux.conf \
|
||||
${./shortcut-without-prefix.conf}
|
||||
'';
|
||||
};
|
||||
|
|
|
@ -22,8 +22,8 @@ with lib;
|
|||
];
|
||||
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.tmux.conf
|
||||
assertFileContent home-files/.tmux.conf ${./vi-all-true.conf}
|
||||
assertFileExists home-files/.config/tmux/tmux.conf
|
||||
assertFileContent home-files/.config/tmux/tmux.conf ${./vi-all-true.conf}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue