Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 8537cf0f818a
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: b1bff52a5ccc
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Jul 20, 2017

  1. programs.zsh.ohMyZsh: add package option to make package overrides …

    …on module-base easier
    Ma27 committed Jul 20, 2017
    Copy the full SHA
    95bf0cc View commit details

Commits on Jul 22, 2017

  1. Merge pull request #27469 from Ma27/oh-my-zsh/make-pkg-configurable

    programs.zsh.ohMyZsh: add `package` option to make package overrides on module-base easier
    Mic92 authored Jul 22, 2017
    Copy the full SHA
    b1bff52 View commit details
Showing with 13 additions and 3 deletions.
  1. +13 −3 nixos/modules/programs/zsh/oh-my-zsh.nix
16 changes: 13 additions & 3 deletions nixos/modules/programs/zsh/oh-my-zsh.nix
Original file line number Diff line number Diff line change
@@ -15,6 +15,16 @@ in
'';
};

package = mkOption {
default = pkgs.oh-my-zsh;
defaultText = "pkgs.oh-my-zsh";
description = ''
Package to install for `oh-my-zsh` usage.
'';

type = types.package;
};

plugins = mkOption {
default = [];
type = types.listOf(types.str);
@@ -46,11 +56,11 @@ in
# Prevent zsh from overwriting oh-my-zsh's prompt
programs.zsh.promptInit = mkDefault "";

environment.systemPackages = with pkgs; [ oh-my-zsh ];
environment.systemPackages = [ cfg.package ];

programs.zsh.interactiveShellInit = with pkgs; with builtins; ''
programs.zsh.interactiveShellInit = with builtins; ''
# oh-my-zsh configuration generated by NixOS
export ZSH=${oh-my-zsh}/share/oh-my-zsh
export ZSH=${cfg.package}/share/oh-my-zsh
${optionalString (length(cfg.plugins) > 0)
"plugins=(${concatStringsSep " " cfg.plugins})"