Move Nix files back to the root of the project

This commit is contained in:
Oliver Davies 2025-03-29 23:19:06 +00:00
parent 52044d9995
commit 087153a16d
223 changed files with 12 additions and 12 deletions

View 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";
};
}