nix/modules/games/norisk/default.nix
2024-11-08 18:23:40 +01:00

47 lines
1.2 KiB
Nix

{
lib,
config,
pkgs,
username,
...
}: let
customPkgs =
pkgs
// {
noriskclient = pkgs.appimageTools.wrapType1 {
name = "noriskclient";
version = "0.5.11";
src = pkgs.fetchurl {
url = "https://github.com/NoRiskClient/noriskclient-launcher/releases/download/v0.5.11/NoRiskClient-Linux.AppImage";
hash = "sha256-Y0TSMQkJhpEgOgPbJwEK3vW85qYnnj69bRp5V7lhd/Q=";
};
};
};
iconurl = "https://raw.githubusercontent.com/NoRiskClient/noriskclient-launcher/refs/heads/main/src/images/norisk_logo.png";
iconsha256 = "sha256-VwWwShUrT055mcabS8QTqqb8INgRB/08U2qEEIVYHlg=";
in {
config = lib.mkIf config.games.enable {
environment.systemPackages = [
customPkgs.noriskclient
];
home-manager.users.${username}.xdg = {
desktopEntries = {
NoRiskClient = {
name = "NoRisk Client";
exec = "noriskclient";
icon = pkgs.fetchurl {
url = iconurl;
sha256 = iconsha256;
};
terminal = false;
type = "Application";
categories = ["Game"];
mimeType = ["text/plain"];
};
};
};
};
}