Compare commits
No commits in common. "607d11bbad7d72f927fac74e98eb749c2c9ab2d1" and "737747f8f5ce4fb1c3c0cf700390a77166f1f214" have entirely different histories.
607d11bbad
...
737747f8f5
|
@ -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}
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
{
|
|
||||||
my.home = {
|
|
||||||
# Always start a tmux session when opening a shell session
|
|
||||||
zsh.launchTmux = true;
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Reference in a new issue