From 6e596ebe14421fe6b666b78a4f85ed6d5ee0c9c2 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 6 Apr 2020 23:29:11 -0400 Subject: [PATCH] Modularize dev/zsh.nix --- modules/dev/default.nix | 2 +- modules/dev/zsh.nix | 20 +++++++++++++++----- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/modules/dev/default.nix b/modules/dev/default.nix index 538517d0..1a69065a 100644 --- a/modules/dev/default.nix +++ b/modules/dev/default.nix @@ -15,7 +15,7 @@ ./rust.nix ./scala.nix ./unity3d.nix - # ./zsh.nix + ./zsh.nix ]; options = {}; diff --git a/modules/dev/zsh.nix b/modules/dev/zsh.nix index 6f298297..8137216a 100644 --- a/modules/dev/zsh.nix +++ b/modules/dev/zsh.nix @@ -5,10 +5,20 @@ # mortals to question the will of the ancient ones. If they want shell programs, # they get shell programs. -{ pkgs, ... }: +{ config, options, lib, pkgs, ... }: +with lib; { - my.packages = with pkgs; [ - shellcheck - my.zunit - ]; + options.modules.dev.zsh = { + enable = mkOption { + type = types.bool; + default = false; + }; + }; + + config = mkIf config.modules.dev.zsh.enable { + my.packages = with pkgs; [ + shellcheck + my.zunit + ]; + }; }