nix/modules/games/norisk/default.nix

46 lines
1.2 KiB
Nix
Raw Normal View History

2024-09-21 09:44:32 +02:00
{
lib,
2024-10-08 14:47:39 +02:00
config,
2024-09-21 09:44:32 +02:00
pkgs,
...
}: let
2024-09-18 22:46:59 +02:00
customPkgs =
pkgs
// {
noriskclient = pkgs.appimageTools.wrapType1 {
name = "noriskclient";
2024-09-28 12:06:19 +02:00
version = "0.5.10";
2024-09-18 22:46:59 +02:00
src = pkgs.fetchurl {
2024-09-28 12:06:19 +02:00
url = "https://github.com/NoRiskClient/noriskclient-launcher/releases/download/v0.5.10/NoRiskClient-Linux.AppImage";
hash = "sha256-y5kXP3kEW0UsV04JBeJCvSOuJf3/zo5s7ZigOpxbwkk=";
2024-09-18 22:46:59 +02:00
};
};
};
2024-10-08 14:47:39 +02:00
logourl = "https://raw.githubusercontent.com/NoRiskClient/noriskclient-launcher/refs/heads/main/src/images/norisk_logo.png";
logsha256 = "sha256-VwWwShUrT055mcabS8QTqqb8INgRB/08U2qEEIVYHlg=";
2024-09-18 22:46:59 +02:00
in {
2024-10-13 13:54:32 +02:00
config = lib.mkIf config.games.enable {
2024-10-08 14:47:39 +02:00
environment.systemPackages = [
customPkgs.noriskclient
];
2024-09-18 22:46:59 +02:00
2024-10-08 14:47:39 +02:00
home-manager.users.joy.xdg = {
desktopEntries = {
NoRiskClient = {
name = "NoRisk Client";
exec = "noriskclient";
icon = pkgs.fetchurl {
url = logourl;
sha256 = logsha256;
};
terminal = false;
type = "Application";
categories = ["Game"];
mimeType = ["text/plain"];
2024-10-03 21:32:31 +02:00
};
2024-09-18 22:46:59 +02:00
};
};
};
}