mirror of
https://github.com/nix-community/home-manager
synced 2024-12-25 04:23:18 +00:00
27d89b49e3
The current zplug nixpkgs puts everything under `$out/`. It pollutes the nix profile dir. This is a breaking change. It depends on an change of the output path in the nixpkgs zplug package.
52 lines
1.1 KiB
Nix
52 lines
1.1 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
{
|
|
config = {
|
|
programs.zsh = {
|
|
enable = true;
|
|
zplug = {
|
|
enable = true;
|
|
zplugHome = pkgs.emptyDirectory;
|
|
plugins = [
|
|
{
|
|
name = "plugins/git";
|
|
tags = [ "from:oh-my-zsh" ];
|
|
}
|
|
{
|
|
name = "lib/clipboard";
|
|
tags = [ "from:oh-my-zsh" ''if:"[[ $OSTYPE == *darwin* ]]"'' ];
|
|
}
|
|
];
|
|
};
|
|
};
|
|
|
|
test.stubs = {
|
|
zplug = { };
|
|
zsh = { };
|
|
};
|
|
|
|
nmt.script = ''
|
|
assertFileContains home-files/.zshrc \
|
|
'source @zplug@/share/zplug/init.zsh'
|
|
|
|
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* ]]"'
|
|
|
|
assertFileContains home-files/.zshrc \
|
|
'if ! zplug check; then
|
|
zplug install
|
|
fi'
|
|
|
|
assertFileRegex home-files/.zshrc \
|
|
'^zplug load$'
|
|
|
|
assertFileContains home-files/.zshrc \
|
|
'export ZPLUG_HOME=${config.programs.zsh.zplug.zplugHome}'
|
|
'';
|
|
};
|
|
}
|