From 09f389fc294491bc4c845b02e523e3bc9e5ac54c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 6 Apr 2020 23:28:26 -0400 Subject: [PATCH] Modularize dev/unity3d.nix --- modules/dev/default.nix | 2 +- modules/dev/unity3d.nix | 18 ++++++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/modules/dev/default.nix b/modules/dev/default.nix index 87575daf..538517d0 100644 --- a/modules/dev/default.nix +++ b/modules/dev/default.nix @@ -14,7 +14,7 @@ ./python.nix ./rust.nix ./scala.nix - # ./unity3d.nix + ./unity3d.nix # ./zsh.nix ]; diff --git a/modules/dev/unity3d.nix b/modules/dev/unity3d.nix index 3aee670d..0734cbf4 100644 --- a/modules/dev/unity3d.nix +++ b/modules/dev/unity3d.nix @@ -2,9 +2,19 @@ # # I don't use Unity often, but when I do, it's in a team or with students. -{ pkgs, ... }: +{ config, options, lib, pkgs, ... }: +with lib; { - my.packages = with pkgs; [ - unity3d - ]; + options.modules.dev.unity3d = { + enable = mkOption { + type = types.bool; + default = false; + }; + }; + + config = mkIf config.modules.dev.unity3d.enable { + my.packages = with pkgs; [ + unity3d + ]; + }; }