aboutsummaryrefslogtreecommitdiffstats
path: root/oni/home/config/common.scm
diff options
context:
space:
mode:
Diffstat (limited to 'oni/home/config/common.scm')
-rw-r--r--oni/home/config/common.scm145
1 files changed, 98 insertions, 47 deletions
diff --git a/oni/home/config/common.scm b/oni/home/config/common.scm
index 093f99f..7db270a 100644
--- a/oni/home/config/common.scm
+++ b/oni/home/config/common.scm
@@ -8,6 +8,7 @@
#:use-module (oni home services guile)
#:use-module (oni home services xmodmap)
#:use-module (oni home services kitty)
+ #:use-module (oni home services zsh)
#:use-module ((gnu services)
#:select (simple-service))
#:use-module ((gnu home services guix)
@@ -21,7 +22,7 @@
#:export (home-redshift-service
home-xbindkeys-service
- home-zsh-service
+ home-zsh-services
home-guile-service
home-xmodmap-service
home-openssh-service
@@ -95,52 +96,6 @@
("f" . "flameshot full ~/pictures/screenshots/")
("c" . "flameshot gui")))))))
-(define home-zsh-service
- (service home-zsh-service-type
- (home-zsh-configuration
- (environment-variables
- '(("HISTFILE" . "$HOME/.zsh/histfile")
- ("HISTSIZE" . "1000")
- ("SAVEHIST" . "1000")
- ("WORDCHARS" . "")))
- (zshrc
- (list
- (mixed-text-file
- "zshrc"
- "fpath=($HOME/.zsh/functions $fpath)\n"
- "autoload -U $HOME/.zsh/functions/*(:t)\n"
- "alias csi=\"rlwrap csi\"\n"
- "alias scsh=\"rlwrap scsh\"\n"
- "alias sbcl=\"rlwrap sbcl\"\n"
- "alias hc=herbstclient\n"
- "alias reco=\"pushd ~/projects/new-dotfiles/ && guix home reconfigure config.scm; popd\"\n"
- "alias abcde=\"guix shell abcde -- abcde\"\n"
- "setopt SHARE_HISTORY\n"
- "setopt HIST_IGNORE_ALL_DUPS\n"
- "setopt HIST_IGNORE_SPACE\n"
- "setopt PROMPT_SUBST\n"
- "zle -N x-copy-region-as-kill\n"
- "zle -N x-kill-region\n"
- "zle -N x-yank\n"
- "bindkey -e '^[w' x-copy-region-as-kill\n"
- "bindkey -e '^W' x-kill-region\n"
- "bindkey -e '^Y' x-yank\n"
- "bindkey -e '^[f' emacs-forward-word\n"
- "bindkey -e '^[F' emacs-forward-word\n"
- "bindkey -e '^[b' emacs-backward-word\n"
- "bindkey -e '^[B' emacs-backward-word\n"
- "autoload -Uz compinit\n"
- "compinit\n"
- "function horizontal-rule() {\n"
- " local width=$(tput cols)\n"
- " echo -e \"\\033[0;32m${(pl:$width::━:)}\\033[0m\"\n"
- "}\n"
- "preexec_functions+=(horizontal-rule)\n"
- "precmd_functions+=(horizontal-rule)\n"
- "PROMPT=\"%T \\$(spwd) %B%(?.%F{2}.%F{1}[%?])>%b%f \"")
- (local-file "zsh/spwd.zsh")
- (local-file "zsh/guix-environment.zsh"))))))
-
(define home-guile-service
(service home-guile-service-type
(home-guile-configuration
@@ -274,3 +229,99 @@ LocalForward 19999 localhost:19999"))
"1db24ca92c28255b28076792b93d533eabb3dc6a"
(openpgp-fingerprint
"F4C2D1DF3FDEEA63D1D30776ACC66D09CA528292")))))))
+
+(define home-zsh-services
+ (list (service home-zsh-service-type
+ (home-zsh-configuration
+ (environment-variables
+ '(("HISTFILE" . "$HOME/.zsh/histfile")
+ ("HISTSIZE" . "1000")
+ ("SAVEHIST" . "1000")
+ ("WORDCHARS" . "")))
+ (zshrc
+ (list
+ (mixed-text-file
+ "zshrc"
+ "fpath=($HOME/.zsh/functions $fpath)\n"
+ "autoload -U $HOME/.zsh/functions/*(:t)\n"
+ "alias csi=\"rlwrap csi\"\n"
+ "alias scsh=\"rlwrap scsh\"\n"
+ "alias sbcl=\"rlwrap sbcl\"\n"
+ "alias hc=herbstclient\n"
+ "alias reco=\"pushd ~/projects/new-dotfiles/ && guix home reconfigure config.scm; popd\"\n"
+ "alias abcde=\"guix shell abcde -- abcde\"\n"
+ "setopt SHARE_HISTORY\n"
+ "setopt HIST_IGNORE_ALL_DUPS\n"
+ "setopt HIST_IGNORE_SPACE\n"
+ "setopt PROMPT_SUBST\n"
+ "zle -N x-copy-region-as-kill\n"
+ "zle -N x-kill-region\n"
+ "zle -N x-yank\n"
+ "bindkey -e '^[w' x-copy-region-as-kill\n"
+ "bindkey -e '^W' x-kill-region\n"
+ "bindkey -e '^Y' x-yank\n"
+ "bindkey -e '^[f' emacs-forward-word\n"
+ "bindkey -e '^[F' emacs-forward-word\n"
+ "bindkey -e '^[b' emacs-backward-word\n"
+ "bindkey -e '^[B' emacs-backward-word\n"
+ "autoload -Uz compinit\n"
+ "compinit\n"
+ "function horizontal-rule() {\n"
+ " local width=$(tput cols)\n"
+ " echo -e \"\\033[0;32m${(pl:$width::━:)}\\033[0m\"\n"
+ "}\n"
+ "preexec_functions+=(horizontal-rule)\n"
+ "precmd_functions+=(horizontal-rule)\n"
+ "PROMPT=\"%T \\$(spwd) %B%(?.%F{2}.%F{1}[%?])>%b%f \"")
+ (local-file "zsh/spwd.zsh")
+ (local-file "zsh/guix-environment.zsh")))))
+ ;; This has to be the first extension because it needs to be added to the
+ ;; configuration last.
+ (service home-zsh-syntax-highlighting-service-type)
+ (service home-zsh-autosuggestions-service-type)
+ (service home-zsh-autopair-service-type)
+ (service home-zsh-atuin-service-type
+ (home-zsh-atuin-configuration
+ (inline-height 20)
+ (filter-mode 'directory)
+ (history-filter
+ '("^ +"))
+ (enter-accept #t)
+ (common-subcommands
+ '("guix"
+ "guix home"
+ "nala"
+ "apt"
+ "cargo"
+ "composer"
+ "dnf"
+ "docker"
+ "docker-compose"
+ "docker compose"
+ "git"
+ "go"
+ "ip"
+ "kubectl"
+ "nix"
+ "nmcli"
+ "npm"
+ "pecl"
+ "pnpm"
+ "podman"
+ "port"
+ "systemctl"
+ "tmux"
+ "yarn"))
+ (sync-address "http://phoenix.fold-kanyu.ts.net:8888")
+ (search-mode "skim")))
+ (service home-files-service-type
+ `((".zsh/functions/spwd"
+ ,(local-file "../../../zsh/.zsh/functions/spwd"))
+ (".zsh/functions/unzip"
+ ,(local-file "../../../zsh/.zsh/functions/unzip"))
+ (".zsh/functions/x-copy-region-as-kill"
+ ,(local-file "../../../zsh/.zsh/functions/x-copy-region-as-kill"))
+ (".zsh/functions/x-kill-region"
+ ,(local-file "../../../zsh/.zsh/functions/x-kill-region"))
+ (".zsh/functions/x-yank"
+ ,(local-file "../../../zsh/.zsh/functions/x-yank"))))))