Compare commits

...

6 commits

Author SHA1 Message Date
lelgenio 8055698166 update "5.3.0" -> "5.5.0" 2024-11-11 01:16:37 +00:00
Leonardo Eugênio 38cf2b507d
Merge pull request #3 from lelgenio/automated-update
[Automated] Update dzgui "5.3.0"
2024-10-01 22:13:46 -03:00
lelgenio 54e6c10bac refactor: extract more things from flake.nix 2024-10-01 12:22:18 -03:00
lelgenio f7a0747d62 refactor: be less flake and overlay dependant 2024-10-01 12:17:07 -03:00
lelgenio af1a43a8de fmt: format with nixfmt-rfc-style 2024-10-01 12:10:35 -03:00
lelgenio 6cd3a545f2 flake: add system check 2024-10-01 12:08:52 -03:00
5 changed files with 58 additions and 44 deletions

View file

@ -3,33 +3,36 @@
inputs = {
nixpkgs.url = "nixpkgs/nixpkgs-unstable";
};
outputs = { self, nixpkgs, ... }:
outputs =
{ self, nixpkgs, ... }:
let
# DayZ only runs on x86_64 systems
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
overlays = [ self.overlays.default ];
};
pkgs = import nixpkgs { inherit system; };
in
with pkgs; {
{
packages.${system} = rec {
default = dzgui;
inherit (pkgs) dzgui;
dzgui = pkgs.callPackage ./package { };
};
overlays = {
default = (final: _: {
dzgui = (final.callPackage ./package { });
});
default = import ./overlay.nix;
};
nixosModules = rec {
default = dzgui;
dzgui = import ./module.nix { inherit self; };
dzgui = import ./module.nix;
};
devShells.${system}.default =
mkShell { buildInputs = self.packages.${system}.default.runtimeDeps; };
devShells.${system}.default = pkgs.mkShell {
buildInputs = self.packages.${system}.default.runtimeDeps;
};
checks.${system}.nixosCheck =
(nixpkgs.lib.nixosSystem {
inherit system;
modules = [ ./nixos-test/configuration.nix ];
}).config.system.build.toplevel;
};
}

View file

@ -1,25 +1,29 @@
{ self, ... }:
{ pkgs, config, lib, ... }:
with lib;
{
pkgs,
config,
lib,
...
}:
let
cfg = config.programs.dzgui;
in
{
options.programs.dzgui = {
enable = mkEnableOption (mdDoc ''
Weather to install dzgui and setup workarounds for DayZ to work on linux
'');
package = mkOption {
type = with types; nullOr package;
default = pkgs.dzgui;
defaultText = literalExpression "pkgs.dzgui";
description = mdDoc "Dzgui package to use.";
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.";
};
};
config = mkIf cfg.enable {
config = lib.mkIf cfg.enable {
# Needed by DayZ
boot.kernel.sysctl."vm.max_map_count" = 1048576;
nixpkgs.overlays = [ self.overlays.default ];
environment.systemPackages = [ cfg.package ];
};
}

View file

@ -0,0 +1,7 @@
{
imports = [ ../module.nix ];
programs.dzgui.enable = true;
boot.isContainer = true;
system.stateVersion = "24.05";
}

1
overlay.nix Normal file
View file

@ -0,0 +1 @@
(final: _: { dzgui = (final.callPackage ./package { }); })

View file

@ -1,25 +1,26 @@
{ lib
, stdenv
, fetchFromGitHub
, makeWrapper
, curl
, jq
, python3
, wmctrl
, xdotool
, gnome
, gobject-introspection
, wrapGAppsHook
{
lib,
stdenv,
fetchFromGitHub,
makeWrapper,
curl,
jq,
python3,
wmctrl,
xdotool,
gnome,
gobject-introspection,
wrapGAppsHook,
}:
stdenv.mkDerivation rec {
pname = "dzgui";
version = "5.3.0";
version = "5.5.0";
src = fetchFromGitHub {
owner = "aclist";
repo = "dztui";
rev = "c2c7b37b904a05cdf0c86dbf3d22ef91728577b9";
sha256 = "sha256-iC/c2MBFjvT0wVnKlpX4kL7fVa3BbjpmbEyjCU+aUyY=";
rev = "bae6a57e1ee5660a07e3a3c326ec68617b831d31";
sha256 = "sha256-x5GSyrbEZoru5p70QVRSFx52Njkhvtg/+qc94MqpOmo=";
};
postPatch = ''
@ -38,9 +39,7 @@ stdenv.mkDerivation rec {
runtimeDeps = [
curl
jq
(python3.withPackages (p: with p; [
pygobject3
]))
(python3.withPackages (p: with p; [ pygobject3 ]))
wmctrl
xdotool