Compare commits

..

No commits in common. "607d11bbad7d72f927fac74e98eb749c2c9ab2d1" and "737747f8f5ce4fb1c3c0cf700390a77166f1f214" have entirely different histories.

3 changed files with 10 additions and 22 deletions

View file

@ -3,10 +3,8 @@ let
cfg = config.my.home.zsh;
in
{
options.my.home.zsh = with lib; {
enable = my.mkDisableOption "zsh configuration";
launchTmux = mkEnableOption "auto launch tmux at shell start";
options.my.home.zsh = with lib.my; {
enable = mkDisableOption "zsh configuration";
};
config = lib.mkIf cfg.enable {
@ -46,16 +44,14 @@ in
defaultKeymap = "emacs";
# Make those happen early to avoid doing double the work
initExtraFirst = ''
${
lib.optionalString cfg.launchTmux ''
# Launch tmux unless already inside one
if [ -z "$TMUX" ]; then
exec tmux new-session
fi
''
}
'';
initExtraFirst =
lib.optionalString config.my.home.tmux.enable ''
# Launch tmux unless already inside one
if [ -z "$TMUX" ]; then
exec tmux new-session
fi
''
;
initExtra = ''
source ${./completion-styles.zsh}

View file

@ -5,7 +5,6 @@
imports = [
./boot.nix
./hardware.nix
./home.nix
./networking.nix
./services.nix
./users.nix

View file

@ -1,7 +0,0 @@
{ ... }:
{
my.home = {
# Always start a tmux session when opening a shell session
zsh.launchTmux = true;
};
}