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

View file

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

View file

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