dzgui-nix/module.nix

30 lines
664 B
Nix
Raw Normal View History

2024-10-01 12:10:35 -03:00
{
pkgs,
config,
lib,
...
}:
2023-05-17 23:33:56 -03:00
let
cfg = config.programs.dzgui;
in
{
options.programs.dzgui = {
enable = lib.mkEnableOption (
lib.mdDoc ''
Weather to install dzgui and setup workarounds for DayZ to work on linux
''
);
package = lib.mkOption {
type = with lib.types; nullOr package;
default = pkgs.callPackage ./package { };
defaultText = lib.literalExpression "pkgs.dzgui";
description = lib.mdDoc "Dzgui package to use.";
2023-05-17 23:33:56 -03:00
};
};
config = lib.mkIf cfg.enable {
2023-05-17 23:33:56 -03:00
# Needed by DayZ
boot.kernel.sysctl."vm.max_map_count" = 1048576;
environment.systemPackages = [ cfg.package ];
};
}