From 48f6fec2f2bf692d90f79933a553ab6a18abb732 Mon Sep 17 00:00:00 2001
From: Jens Nolte <jens@nightmarestudio.de>
Date: Wed, 6 May 2020 17:39:12 +0200
Subject: [PATCH] Add alias to start tmux in transient scope

---
 layers/zsh.nix | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/layers/zsh.nix b/layers/zsh.nix
index 136acd6..21e78a9 100644
--- a/layers/zsh.nix
+++ b/layers/zsh.nix
@@ -51,6 +51,9 @@ in
     copy = "xclip -selection c -i";
     paste = "xclip -selection c -o";
 
+    # Start tmux in a transient scope (a PAM session would be better but this works)
+    tmux-new = "systemd-run --scope --user tmux";
+
     msub = "mosquitto_sub";
     mpub = "mosquitto_pub";
 
-- 
GitLab