nix/modules/games/norisk/default.nix

50 lines
1.2 KiB
Nix
Raw Permalink 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,
2024-11-08 18:23:40 +01:00
username,
2024-09-21 09:44:32 +02:00
...
}: let
2024-09-18 22:46:59 +02:00
customPkgs =
pkgs
// {
2024-11-23 15:30:03 +01:00
no-risk-client = pkgs.appimageTools.wrapType1 {
2024-12-06 17:41:19 +01:00
pname = "no-risk-client";
2024-11-18 17:52:21 +01:00
version = "0.5.13";
2024-09-18 22:46:59 +02:00
src = pkgs.fetchurl {
2024-11-18 17:52:21 +01:00
url = "https://github.com/NoRiskClient/noriskclient-launcher/releases/download/v0.5.13/NoRiskClient-Linux.AppImage";
hash = "sha256-Zg5kgoOLvBKyphYA32E+Jd4uGgYGQEameDFF85eiejA=";
2024-09-18 22:46:59 +02:00
};
};
};
2024-11-08 13:50:09 +01:00
iconurl = "https://raw.githubusercontent.com/NoRiskClient/noriskclient-launcher/refs/heads/main/src/images/norisk_logo.png";
iconsha256 = "sha256-VwWwShUrT055mcabS8QTqqb8INgRB/08U2qEEIVYHlg=";
2024-09-18 22:46:59 +02:00
in {
2024-11-24 20:15:38 +01:00
options = {
norisk.enable = lib.mkEnableOption "";
};
config = lib.mkIf config.norisk.enable {
2024-10-08 14:47:39 +02:00
environment.systemPackages = [
2024-11-23 15:30:03 +01:00
customPkgs.no-risk-client
2024-10-08 14:47:39 +02:00
];
2024-09-18 22:46:59 +02:00
2024-11-08 18:23:40 +01:00
home-manager.users.${username}.xdg = {
2024-10-08 14:47:39 +02:00
desktopEntries = {
2024-11-23 15:30:03 +01:00
no-risk-client = {
name = "no-risk-client";
exec = "no-risk-client";
2024-10-08 14:47:39 +02:00
icon = pkgs.fetchurl {
2024-11-08 13:50:09 +01:00
url = iconurl;
sha256 = iconsha256;
2024-10-08 14:47:39 +02:00
};
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
};
};
};
}