diff options
| author | Simen A. W. Olsen <hello@simenandre.no> | 2026-03-21 19:29:01 +0100 |
|---|---|---|
| committer | Simen A. W. Olsen <hello@simenandre.no> | 2026-03-21 19:29:01 +0100 |
| commit | 0036cc2234435586df52524ce192f87a28f8e986 (patch) | |
| tree | f9f7ada565a49ae34376ecf21726348539e2bf30 /modules/home/zsh.nix | |
| parent | e24043a06675a6fedcccc775fe3d285e0bf3a4b1 (diff) | |
| download | dotfiles-0036cc2234435586df52524ce192f87a28f8e986.tar.gz dotfiles-0036cc2234435586df52524ce192f87a28f8e986.zip | |
refactor(zsh): use nix to fetch zsh-snap instead of runtime git clone
Diffstat (limited to 'modules/home/zsh.nix')
| -rw-r--r-- | modules/home/zsh.nix | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/modules/home/zsh.nix b/modules/home/zsh.nix index 50a3fcf..840e553 100644 --- a/modules/home/zsh.nix +++ b/modules/home/zsh.nix @@ -1,7 +1,16 @@ { pkgs, ... }: +let + znap = pkgs.fetchFromGitHub { + owner = "marlonrichert"; + repo = "zsh-snap"; + rev = "main"; + hash = "sha256-wNxNraqlY3Uy4RTUl/2IwJqfUDz/mqILq5QPNrWZxi8="; + }; +in { home.file = { + ".zsh_repos/znap".source = znap; ".zshenv".text = '' ##!/bin/zsh # @@ -41,10 +50,6 @@ # https://github.com/koalaman/shellcheck/issues/809 # shellcheck disable=SC1090 # sourced filenames with variables - # Download Znap, if it's not there yet. - [[ -r ~/.zsh_repos/znap/znap.zsh ]] || - git clone --depth 1 -- \ - https://github.com/marlonrichert/zsh-snap.git ~/.zsh_repos/znap source ~/.zsh_repos/znap/znap.zsh # Start Znap znap eval starship 'starship init zsh --print-full-init' |
