2020-04-06 20:06:10 -07:00
|
|
|
# modules/dev/lua.nix --- https://www.lua.org/
|
|
|
|
#
|
|
|
|
# I use lua for modding, awesomewm or Love2D for rapid gamedev prototyping (when
|
|
|
|
# godot is overkill and I have the luxury of avoiding JS). I write my Love games
|
|
|
|
# in moonscript to get around lua's idiosynchrosies. That said, I install love2d
|
|
|
|
# on a per-project basis.
|
|
|
|
|
|
|
|
{ config, options, lib, pkgs, ... }:
|
2020-10-01 15:46:04 -07:00
|
|
|
|
2020-04-06 20:06:10 -07:00
|
|
|
with lib;
|
2020-10-01 15:46:04 -07:00
|
|
|
with lib.my;
|
|
|
|
let cfg = config.modules.dev.lua;
|
|
|
|
in {
|
2020-04-06 20:06:10 -07:00
|
|
|
options.modules.dev.lua = {
|
2020-10-01 15:46:04 -07:00
|
|
|
enable = mkBoolOpt false;
|
|
|
|
love2D.enable = mkBoolOpt false;
|
2020-04-06 20:06:10 -07:00
|
|
|
};
|
|
|
|
|
2020-10-01 15:46:04 -07:00
|
|
|
config = mkIf cfg.enable {
|
|
|
|
user.packages = with pkgs; [
|
|
|
|
lua
|
|
|
|
luaPackages.moonscript
|
|
|
|
(mkIf cfg.love2D.enable love2d)
|
|
|
|
];
|
2020-04-06 20:06:10 -07:00
|
|
|
};
|
|
|
|
}
|