mirror of
https://github.com/lelgenio/dzgui-nix.git
synced 2025-01-18 22:56:26 -03:00
Compare commits
No commits in common. "54e6c10bacb47bb58e2749cd4990a4c2ab5006c4" and "eca167dfeb156f1d03eb44f63f92ece0b29872ef" have entirely different histories.
54e6c10bac
...
eca167dfeb
29
flake.nix
29
flake.nix
|
@ -3,36 +3,33 @@
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "nixpkgs/nixpkgs-unstable";
|
nixpkgs.url = "nixpkgs/nixpkgs-unstable";
|
||||||
};
|
};
|
||||||
outputs =
|
outputs = { self, nixpkgs, ... }:
|
||||||
{ self, nixpkgs, ... }:
|
|
||||||
let
|
let
|
||||||
# DayZ only runs on x86_64 systems
|
# DayZ only runs on x86_64 systems
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
pkgs = import nixpkgs { inherit system; };
|
pkgs = import nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
overlays = [ self.overlays.default ];
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
with pkgs; {
|
||||||
packages.${system} = rec {
|
packages.${system} = rec {
|
||||||
default = dzgui;
|
default = dzgui;
|
||||||
dzgui = pkgs.callPackage ./package { };
|
inherit (pkgs) dzgui;
|
||||||
};
|
};
|
||||||
|
|
||||||
overlays = {
|
overlays = {
|
||||||
default = import ./overlay.nix;
|
default = (final: _: {
|
||||||
|
dzgui = (final.callPackage ./package { });
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
nixosModules = rec {
|
nixosModules = rec {
|
||||||
default = dzgui;
|
default = dzgui;
|
||||||
dzgui = import ./module.nix;
|
dzgui = import ./module.nix { inherit self; };
|
||||||
};
|
};
|
||||||
|
|
||||||
devShells.${system}.default = pkgs.mkShell {
|
devShells.${system}.default =
|
||||||
buildInputs = self.packages.${system}.default.runtimeDeps;
|
mkShell { buildInputs = self.packages.${system}.default.runtimeDeps; };
|
||||||
};
|
|
||||||
|
|
||||||
checks.${system}.nixosCheck =
|
|
||||||
(nixpkgs.lib.nixosSystem {
|
|
||||||
inherit system;
|
|
||||||
modules = [ ./nixos-test/configuration.nix ];
|
|
||||||
}).config.system.build.toplevel;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
28
module.nix
28
module.nix
|
@ -1,29 +1,25 @@
|
||||||
{
|
{ self, ... }:
|
||||||
pkgs,
|
{ pkgs, config, lib, ... }:
|
||||||
config,
|
with lib;
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
cfg = config.programs.dzgui;
|
cfg = config.programs.dzgui;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.programs.dzgui = {
|
options.programs.dzgui = {
|
||||||
enable = lib.mkEnableOption (
|
enable = mkEnableOption (mdDoc ''
|
||||||
lib.mdDoc ''
|
|
||||||
Weather to install dzgui and setup workarounds for DayZ to work on linux
|
Weather to install dzgui and setup workarounds for DayZ to work on linux
|
||||||
''
|
'');
|
||||||
);
|
package = mkOption {
|
||||||
package = lib.mkOption {
|
type = with types; nullOr package;
|
||||||
type = with lib.types; nullOr package;
|
default = pkgs.dzgui;
|
||||||
default = pkgs.callPackage ./package { };
|
defaultText = literalExpression "pkgs.dzgui";
|
||||||
defaultText = lib.literalExpression "pkgs.dzgui";
|
description = mdDoc "Dzgui package to use.";
|
||||||
description = lib.mdDoc "Dzgui package to use.";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
config = lib.mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
# Needed by DayZ
|
# Needed by DayZ
|
||||||
boot.kernel.sysctl."vm.max_map_count" = 1048576;
|
boot.kernel.sysctl."vm.max_map_count" = 1048576;
|
||||||
|
nixpkgs.overlays = [ self.overlays.default ];
|
||||||
environment.systemPackages = [ cfg.package ];
|
environment.systemPackages = [ cfg.package ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
{
|
|
||||||
imports = [ ../module.nix ];
|
|
||||||
programs.dzgui.enable = true;
|
|
||||||
|
|
||||||
boot.isContainer = true;
|
|
||||||
system.stateVersion = "24.05";
|
|
||||||
}
|
|
|
@ -1 +0,0 @@
|
||||||
(final: _: { dzgui = (final.callPackage ./package { }); })
|
|
|
@ -1,16 +1,15 @@
|
||||||
{
|
{ lib
|
||||||
lib,
|
, stdenv
|
||||||
stdenv,
|
, fetchFromGitHub
|
||||||
fetchFromGitHub,
|
, makeWrapper
|
||||||
makeWrapper,
|
, curl
|
||||||
curl,
|
, jq
|
||||||
jq,
|
, python3
|
||||||
python3,
|
, wmctrl
|
||||||
wmctrl,
|
, xdotool
|
||||||
xdotool,
|
, gnome
|
||||||
gnome,
|
, gobject-introspection
|
||||||
gobject-introspection,
|
, wrapGAppsHook
|
||||||
wrapGAppsHook,
|
|
||||||
}:
|
}:
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "dzgui";
|
pname = "dzgui";
|
||||||
|
@ -39,7 +38,9 @@ stdenv.mkDerivation rec {
|
||||||
runtimeDeps = [
|
runtimeDeps = [
|
||||||
curl
|
curl
|
||||||
jq
|
jq
|
||||||
(python3.withPackages (p: with p; [ pygobject3 ]))
|
(python3.withPackages (p: with p; [
|
||||||
|
pygobject3
|
||||||
|
]))
|
||||||
|
|
||||||
wmctrl
|
wmctrl
|
||||||
xdotool
|
xdotool
|
||||||
|
|
Loading…
Reference in a new issue