From e863074b3c62d263b676c41abb96688ef46fad12 Mon Sep 17 00:00:00 2001 From: SouthFox Date: Mon, 18 Nov 2024 15:02:16 +0800 Subject: [PATCH] [feat] add zellij Signed-off-by: SouthFox --- files/zshrc | 2 ++ home-configuration.scm | 20 +++++++++++++------- packages.scm | 29 +++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 7 deletions(-) diff --git a/files/zshrc b/files/zshrc index 9a34ea7..0a32463 100644 --- a/files/zshrc +++ b/files/zshrc @@ -97,3 +97,5 @@ eval "$(fzf --zsh)" export PYENV_ROOT="$HOME/.pyenv" [[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH" eval "$(pyenv init -)" + +eval "$(zellij setup --generate-auto-start zsh)" diff --git a/home-configuration.scm b/home-configuration.scm index 392bc00..6ce5d51 100644 --- a/home-configuration.scm +++ b/home-configuration.scm @@ -18,12 +18,18 @@ (home-environment ;; Below is the list of packages that will show up in your ;; Home profile, under ~/.guix-home/profile. - (packages (specifications->packages (list "guile-hoot" - "guile-next" - "zsh" - "zsh-autosuggestions" - "zsh-syntax-highlighting" - "fzf"))) + (packages (append (specifications->packages + (list + "guile-hoot" + "guile-next" + "zsh" + "zsh-autosuggestions" + "zsh-syntax-highlighting" + "fzf" + )) + (list + zellij) + )) (services (list @@ -32,7 +38,7 @@ (service home-zsh-service-type (home-zsh-configuration (zshrc (list (local-file "files/zshrc"))) - )) + )) ) ) ) diff --git a/packages.scm b/packages.scm index d674efe..c12b54d 100644 --- a/packages.scm +++ b/packages.scm @@ -37,3 +37,32 @@ your morning, and an auto-update tool that makes it easy to keep up with the lat (list (service-extension home-files-service-type (lambda (_) (list `(".oh-my-zsh" ,oh-my-zsh)))))))) + +(define-public zellij + (package + (name "zellij") + (version "0.41.1") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/zellij-org/zellij/releases/download/v" + version "/zellij-x86_64-unknown-linux-musl.tar.gz")) + (sha256 + (base32 "113c9agbx36hiq6a1kf2jydrv3h3cd8s0albnwxi0qd1c0n1rxyw") + ))) + (build-system copy-build-system) + (arguments + (list + #:substitutable? #f + #:install-plan + #~'(("zellij" "bin/")) + #:phases + #~(modify-phases %standard-phases + (replace 'unpack + (lambda* (#:key source #:allow-other-keys) + (invoke "tar" "-xvf" source)))))) + (home-page "https://github.com/zellij-org/zellij") + (synopsis "A terminal workspace with batteries included.") + (description + "A terminal workspace with batteries included.") + (license expat)))