Move Nix files back to the root of the project
This commit is contained in:
parent
52044d9995
commit
087153a16d
223 changed files with 12 additions and 12 deletions
41
modules/home-manager/cli/tmux-sessionizer.nix
Normal file
41
modules/home-manager/cli/tmux-sessionizer.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
options.homeManagerModules.tmux-sessionizer.enable = mkEnableOption "Enable tmux-sessionizer";
|
||||
|
||||
config = mkIf config.homeManagerModules.tmux-sessionizer.enable {
|
||||
home.packages = with pkgs; [ tmux-sessionizer ];
|
||||
|
||||
home.file."${config.xdg.configHome}/tmux-sessionizer/default".source = "${
|
||||
pkgs.writeShellApplication {
|
||||
name = ".tmux-sessionizer";
|
||||
|
||||
runtimeInputs = with pkgs; [
|
||||
tmux
|
||||
];
|
||||
|
||||
text = ''
|
||||
set +o errexit
|
||||
set +o nounset
|
||||
|
||||
if [[ "$PWD" == "$XDG_REPOS_DIR/os" || "$PWD" == "$XDG_REPOS_DIR/personal" ]]; then
|
||||
clear
|
||||
|
||||
return
|
||||
fi
|
||||
|
||||
tmux new-window -d -n scratch
|
||||
nvim .
|
||||
clear
|
||||
'';
|
||||
}
|
||||
}/bin/.tmux-sessionizer";
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue