2020-03-20 10:02:58 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
{
|
|
|
|
config = {
|
|
|
|
programs.zsh = {
|
|
|
|
enable = true;
|
|
|
|
zplug = {
|
|
|
|
enable = true;
|
2022-11-27 00:37:24 +00:00
|
|
|
zplugHome = pkgs.emptyDirectory;
|
2020-03-20 10:02:58 +00:00
|
|
|
plugins = [
|
|
|
|
{
|
|
|
|
name = "plugins/git";
|
|
|
|
tags = [ "from:oh-my-zsh" ];
|
|
|
|
}
|
|
|
|
{
|
|
|
|
name = "lib/clipboard";
|
|
|
|
tags = [ "from:oh-my-zsh" ''if:"[[ $OSTYPE == *darwin* ]]"'' ];
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-09-26 09:08:45 +00:00
|
|
|
test.stubs = {
|
|
|
|
zplug = { };
|
|
|
|
zsh = { };
|
|
|
|
};
|
2020-03-20 10:02:58 +00:00
|
|
|
|
|
|
|
nmt.script = ''
|
2021-09-26 09:08:45 +00:00
|
|
|
assertFileContains home-files/.zshrc \
|
2023-04-29 09:08:16 +00:00
|
|
|
'source @zplug@/share/zplug/init.zsh'
|
2020-03-20 10:02:58 +00:00
|
|
|
|
|
|
|
assertFileContains home-files/.zshrc \
|
|
|
|
'zplug "plugins/git", from:oh-my-zsh'
|
|
|
|
|
|
|
|
assertFileContains home-files/.zshrc \
|
|
|
|
'zplug "lib/clipboard", from:oh-my-zsh, if:"[[ $OSTYPE == *darwin* ]]"'
|
|
|
|
|
2020-09-06 09:16:34 +00:00
|
|
|
assertFileContains home-files/.zshrc \
|
|
|
|
'if ! zplug check; then
|
|
|
|
zplug install
|
|
|
|
fi'
|
2020-03-20 10:02:58 +00:00
|
|
|
|
|
|
|
assertFileRegex home-files/.zshrc \
|
|
|
|
'^zplug load$'
|
2021-10-16 21:35:03 +00:00
|
|
|
|
|
|
|
assertFileContains home-files/.zshrc \
|
|
|
|
'export ZPLUG_HOME=${config.programs.zsh.zplug.zplugHome}'
|
2020-03-20 10:02:58 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|