diff --git a/nix/modules/unityhub/home.nix b/nix/modules/unityhub/home.nix index 26ca7bc..a7addcc 100644 --- a/nix/modules/unityhub/home.nix +++ b/nix/modules/unityhub/home.nix @@ -1,8 +1,21 @@ -{ pkgs, ... }: { - home.packages = with pkgs; [ - unityhub - ]; - # so alcom can use it - home.file.".local/bin/unityhub".source = "${pkgs.unityhub}/bin/unityhub"; + pkgs, + lib, + config, + ... +}: +let + cfg = config.modules.unityhub; +in +{ + options.modules.unityhub = { + enable = lib.mkEnableOption "unity"; + }; + config.home = lib.mkIf cfg.enable { + packages = with pkgs; [ + unityhub + ]; + # so alcom can use it + file.".local/bin/unityhub".source = "${pkgs.unityhub}/bin/unityhub"; + }; }