Compare commits
5 commits
737747f8f5
...
607d11bbad
Author | SHA1 | Date | |
---|---|---|---|
Bruno BELANYI | 607d11bbad | ||
Bruno BELANYI | 06989facc2 | ||
Bruno BELANYI | 55b828cba9 | ||
Bruno BELANYI | 34c13b077f | ||
Bruno BELANYI | 0bbf522c03 |
|
@ -3,8 +3,10 @@ let
|
|||
cfg = config.my.home.zsh;
|
||||
in
|
||||
{
|
||||
options.my.home.zsh = with lib.my; {
|
||||
enable = mkDisableOption "zsh configuration";
|
||||
options.my.home.zsh = with lib; {
|
||||
enable = my.mkDisableOption "zsh configuration";
|
||||
|
||||
launchTmux = mkEnableOption "auto launch tmux at shell start";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
@ -44,14 +46,16 @@ in
|
|||
defaultKeymap = "emacs";
|
||||
|
||||
# Make those happen early to avoid doing double the work
|
||||
initExtraFirst =
|
||||
lib.optionalString config.my.home.tmux.enable ''
|
||||
# Launch tmux unless already inside one
|
||||
if [ -z "$TMUX" ]; then
|
||||
exec tmux new-session
|
||||
fi
|
||||
''
|
||||
;
|
||||
initExtraFirst = ''
|
||||
${
|
||||
lib.optionalString cfg.launchTmux ''
|
||||
# Launch tmux unless already inside one
|
||||
if [ -z "$TMUX" ]; then
|
||||
exec tmux new-session
|
||||
fi
|
||||
''
|
||||
}
|
||||
'';
|
||||
|
||||
initExtra = ''
|
||||
source ${./completion-styles.zsh}
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
imports = [
|
||||
./boot.nix
|
||||
./hardware.nix
|
||||
./home.nix
|
||||
./networking.nix
|
||||
./services.nix
|
||||
./users.nix
|
||||
|
|
7
machines/porthos/home.nix
Normal file
7
machines/porthos/home.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ ... }:
|
||||
{
|
||||
my.home = {
|
||||
# Always start a tmux session when opening a shell session
|
||||
zsh.launchTmux = true;
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue