fmt: format with nixfmt-rfc-style

This commit is contained in:
lelgenio 2024-10-01 12:10:35 -03:00
parent 6cd3a545f2
commit af1a43a8de
3 changed files with 40 additions and 34 deletions

View file

@ -3,7 +3,8 @@
inputs = { inputs = {
nixpkgs.url = "nixpkgs/nixpkgs-unstable"; nixpkgs.url = "nixpkgs/nixpkgs-unstable";
}; };
outputs = { self, nixpkgs, ... }: outputs =
{ 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";
@ -12,16 +13,15 @@
overlays = [ self.overlays.default ]; overlays = [ self.overlays.default ];
}; };
in in
with pkgs; { with pkgs;
{
packages.${system} = rec { packages.${system} = rec {
default = dzgui; default = dzgui;
inherit (pkgs) dzgui; inherit (pkgs) dzgui;
}; };
overlays = { overlays = {
default = (final: _: { default = (final: _: { dzgui = (final.callPackage ./package { }); });
dzgui = (final.callPackage ./package { });
});
}; };
nixosModules = rec { nixosModules = rec {
@ -29,20 +29,22 @@
dzgui = import ./module.nix { inherit self; }; dzgui = import ./module.nix { inherit self; };
}; };
devShells.${system}.default = devShells.${system}.default = mkShell {
mkShell { buildInputs = self.packages.${system}.default.runtimeDeps; }; buildInputs = self.packages.${system}.default.runtimeDeps;
};
checks.${system}.nixosCheck = (nixpkgs.lib.nixosSystem { checks.${system}.nixosCheck =
inherit system; (nixpkgs.lib.nixosSystem {
modules = [ inherit system;
self.nixosModules.default modules = [
{ self.nixosModules.default
programs.dzgui.enable = true; {
programs.dzgui.enable = true;
boot.isContainer = true; boot.isContainer = true;
system.stateVersion = "24.05"; system.stateVersion = "24.05";
} }
]; ];
}).config.system.build.toplevel; }).config.system.build.toplevel;
}; };
} }

View file

@ -1,5 +1,10 @@
{ self, ... }: { self, ... }:
{ pkgs, config, lib, ... }: {
pkgs,
config,
lib,
...
}:
with lib; with lib;
let let
cfg = config.programs.dzgui; cfg = config.programs.dzgui;

View file

@ -1,15 +1,16 @@
{ lib {
, stdenv lib,
, fetchFromGitHub stdenv,
, makeWrapper fetchFromGitHub,
, curl makeWrapper,
, jq curl,
, python3 jq,
, wmctrl python3,
, xdotool wmctrl,
, gnome xdotool,
, gobject-introspection gnome,
, wrapGAppsHook gobject-introspection,
wrapGAppsHook,
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "dzgui"; pname = "dzgui";
@ -38,9 +39,7 @@ stdenv.mkDerivation rec {
runtimeDeps = [ runtimeDeps = [
curl curl
jq jq
(python3.withPackages (p: with p; [ (python3.withPackages (p: with p; [ pygobject3 ]))
pygobject3
]))
wmctrl wmctrl
xdotool xdotool