chore: format with alejandra

This commit is contained in:
steveej 2023-02-07 18:24:28 +01:00
parent 05f0cbdfb4
commit 89f5f65f2d
181 changed files with 2720 additions and 2560 deletions

View file

@ -1,8 +1,4 @@
{ pkgs }:
{ ... }:
let
{pkgs}: {...}: let
just-plugin = let
plugin_file = pkgs.writeText "_just" ''
#compdef just
@ -22,19 +18,18 @@ let
_describe 'command' subcmds
'';
in pkgs.stdenv.mkDerivation {
name = "just-completions";
version = "0.1.0";
phases = "installPhase";
installPhase = ''
PLUGIN_PATH=$out/share/oh-my-zsh/plugins/just
mkdir -p $PLUGIN_PATH
cp ${plugin_file} $PLUGIN_PATH/_just
chmod --recursive a-w $out
'';
};
in
pkgs.stdenv.mkDerivation {
name = "just-completions";
version = "0.1.0";
phases = "installPhase";
installPhase = ''
PLUGIN_PATH=$out/share/oh-my-zsh/plugins/just
mkdir -p $PLUGIN_PATH
cp ${plugin_file} $PLUGIN_PATH/_just
chmod --recursive a-w $out
'';
};
in {
programs.zsh = {
enable = true;
@ -42,7 +37,8 @@ in {
# will be called again by oh-my-zsh
enableCompletion = false;
enableAutosuggestions = true;
initExtra = let inNixShell = ''$([[ -n "$IN_NIX_SHELL" ]] && printf " 🐚")'';
initExtra = let
inNixShell = ''$([[ -n "$IN_NIX_SHELL" ]] && printf " 🐚")'';
in ''
PROMPT='%F{%(!.red.green)}%n%f@%m %(?.%F{green}%f.%F{red} ($?%))%f %F{blue}%~%f${inNixShell}%F{magenta}$(git_prompt_info)%f$prompt_newline%_%F{%(!.red.green)}$(prompt_char)%f '
RPROMPT=""
@ -54,11 +50,14 @@ in {
. $HOME/.shrc.d/sh_aliases
fi
${if builtins.hasAttr "homeshick" pkgs then ''
source ${pkgs.homeshick}/homeshick.sh
fpath=(${pkgs.homeshick}/completions $fpath)
'' else
""}
${
if builtins.hasAttr "homeshick" pkgs
then ''
source ${pkgs.homeshick}/homeshick.sh
fpath=(${pkgs.homeshick}/completions $fpath)
''
else ""
}
# Disable intercepting of ctrl-s and ctrl-q as flow control.
stty stop ''' -ixoff -ixon
@ -115,7 +114,7 @@ in {
oh-my-zsh = {
enable = true;
theme = "tjkirch";
plugins = [ "git" "sudo" ];
plugins = ["git" "sudo"];
};
};
}