summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--docs/canonical-laptop.md4
-rw-r--r--dot_config/zellij/config.kdl.tmpl (renamed from dot_config/zellij/config.kdl)3
-rw-r--r--tests/test_canonical.py17
3 files changed, 23 insertions, 1 deletions
diff --git a/docs/canonical-laptop.md b/docs/canonical-laptop.md
index ef988e1..67442f4 100644
--- a/docs/canonical-laptop.md
+++ b/docs/canonical-laptop.md
@@ -135,7 +135,9 @@ existing PaperWM installation, run `just canonical-extensions`, log out and back
in, then run `just canonical-desktop`. No `just apply` is needed for these settings.
Ghostty starts Nix zsh as a login shell. It does not change the authd account's
-shell. GNOME keeps its own desktop environment and GNOME Keyring. `pass` remains
+shell. Zellij explicitly starts Nix zsh for new shells. Existing bash panes
+remain bash; run `exec ~/.nix-profile/bin/zsh` in those panes, or start a new
+session after deployment. GNOME keeps its own desktop environment and GNOME Keyring. `pass` remains
a terminal tool; this role does not install the pass Secret Service daemon.
## Package Sources
diff --git a/dot_config/zellij/config.kdl b/dot_config/zellij/config.kdl.tmpl
index d87771a..04e1bbf 100644
--- a/dot_config/zellij/config.kdl
+++ b/dot_config/zellij/config.kdl.tmpl
@@ -1,3 +1,6 @@
+{{ if eq (default "host" (index . "machineRole")) "canonical" }}
+default_shell {{ printf "%s/.nix-profile/bin/zsh" .chezmoi.homeDir | quote }}
+{{ end }}
// Gruvbox dark theme (built-in)
theme "gruvbox-dark"
diff --git a/tests/test_canonical.py b/tests/test_canonical.py
index 1a9be82..724b922 100644
--- a/tests/test_canonical.py
+++ b/tests/test_canonical.py
@@ -150,6 +150,23 @@ class PackageTests(unittest.TestCase):
class RoleTests(unittest.TestCase):
+ def test_canonical_zellij_uses_zsh_without_changing_other_roles(self):
+ for role in ("canonical", "host", "vm"):
+ rendered = subprocess.check_output(
+ self.command(
+ role,
+ "execute-template",
+ "--file",
+ str(ROOT / "dot_config/zellij/config.kdl.tmpl"),
+ ),
+ text=True,
+ )
+ if role == "canonical":
+ self.assertIn('/.nix-profile/bin/zsh"', rendered)
+ self.assertIn('default_shell "', rendered)
+ else:
+ self.assertNotIn("default_shell", rendered)
+
def test_canonical_ghostty_has_no_window_decoration(self):
rendered = subprocess.check_output(
self.command(