nixos-config/modules/dev/gamedev.nix

39 lines
951 B
Nix
Raw Normal View History

2020-08-06 15:35:49 +00:00
# I've yet to delve into game development but here we are.
# This contains several toolchains such as Unity, Godot Engine, and Love.
{ config, options, lib, pkgs, ... }:
with lib;
2020-12-29 14:32:59 +00:00
let cfg = config.modules.dev.game-dev;
2020-10-25 15:49:14 +00:00
in {
options.modules.dev.game-dev = let
mkBoolOption = bool:
mkOption {
type = types.bool;
default = bool;
};
in {
defold.enable = mkBoolOption false;
godot.enable = mkBoolOption false;
unity3d.enable = mkBoolOption false;
};
2020-08-06 15:35:49 +00:00
config = {
2020-08-16 08:33:44 +00:00
my.packages = with pkgs;
2020-10-25 15:49:14 +00:00
(if cfg.godot.enable then
[
godot # The Godot, not to be confused with a certain prosecutor.
]
else
[ ]) ++
2020-08-06 15:35:49 +00:00
2020-10-25 15:49:14 +00:00
(if cfg.defold.enable then [ defold ] else [ ]) ++
2020-08-06 15:35:49 +00:00
(if cfg.unity3d.enable then [
2020-10-25 15:49:14 +00:00
unity3d # The Unity, not to be confused with a certain ideal.
unityhub # The ideal hub for your Unity projects.
] else
[ ]);
2020-08-06 15:35:49 +00:00
};
}