fork/home-manager

git clone https://git.julia.blue/fork/home-manager

Robert Helgessontests: some minor cleanupsaf715ed8

master
1.0 KiB48 linesraw
1{ config, pkgs, ... }:
2
3{
4  programs.zsh = {
5    enable = true;
6    zplug = {
7      enable = true;
8      zplugHome = pkgs.emptyDirectory;
9      plugins = [
10        {
11          name = "plugins/git";
12          tags = [ "from:oh-my-zsh" ];
13        }
14        {
15          name = "lib/clipboard";
16          tags = [ "from:oh-my-zsh" ''if:"[[ $OSTYPE == *darwin* ]]"'' ];
17        }
18      ];
19    };
20  };
21
22  test.stubs = {
23    zplug = { };
24    zsh = { };
25  };
26
27  nmt.script = ''
28    assertFileContains home-files/.zshrc \
29      'source @zplug@/share/zplug/init.zsh'
30
31    assertFileContains home-files/.zshrc \
32      'zplug "plugins/git", from:oh-my-zsh'
33
34    assertFileContains home-files/.zshrc \
35      'zplug "lib/clipboard", from:oh-my-zsh, if:"[[ $OSTYPE == *darwin* ]]"'
36
37    assertFileContains home-files/.zshrc \
38      'if ! zplug check; then
39         zplug install
40       fi'
41
42    assertFileRegex home-files/.zshrc \
43      '^zplug load$'
44
45    assertFileContains home-files/.zshrc \
46      'export ZPLUG_HOME=${config.programs.zsh.zplug.zplugHome}'
47  '';
48}