From 6f0e24e28bdf0655de6c92a42b0dfc579ce0208c Mon Sep 17 00:00:00 2001 From: joy Date: Wed, 18 Sep 2024 19:27:14 +0200 Subject: [PATCH] suyu --- hosts/desktop/default.nix | 1 + modules/apps/gui/games/default.nix | 28 +++----------------- modules/apps/gui/games/steam/default.nix | 27 +++++++++++++++++++ modules/apps/gui/games/suyu/default.nix | 33 ++++++++++++++++++++++++ modules/apps/gui/games/suyu/logo.svg | 4 +++ 5 files changed, 69 insertions(+), 24 deletions(-) create mode 100644 modules/apps/gui/games/steam/default.nix create mode 100644 modules/apps/gui/games/suyu/default.nix create mode 100644 modules/apps/gui/games/suyu/logo.svg diff --git a/hosts/desktop/default.nix b/hosts/desktop/default.nix index 7191d50..585c4a0 100644 --- a/hosts/desktop/default.nix +++ b/hosts/desktop/default.nix @@ -1,6 +1,7 @@ {...}: { networking.hostName = "desktop"; services.hardware.openrgb.enable = true; + services.ollama.enable = true; games.enable = true; diff --git a/modules/apps/gui/games/default.nix b/modules/apps/gui/games/default.nix index 5e68e72..73cf962 100644 --- a/modules/apps/gui/games/default.nix +++ b/modules/apps/gui/games/default.nix @@ -1,26 +1,6 @@ { - pkgs, - lib, - config, - ... -}: { - options = { - games.enable = lib.mkEnableOption ""; - }; - config = lib.mkIf config.games.enable { - nixpkgs.config.allowUnfreePredicate = pkg: - builtins.elem (lib.getName pkg) [ - "steam-original" - "steam" - "steam-run" - ]; - programs.steam.enable = true; - environment.systemPackages = with pkgs; [ - prismlauncher - dolphin-emu - zulu17 - mangohud - lutris - ]; - }; + imports = [ + ./suyu + ./steam + ]; } diff --git a/modules/apps/gui/games/steam/default.nix b/modules/apps/gui/games/steam/default.nix new file mode 100644 index 0000000..2e683ae --- /dev/null +++ b/modules/apps/gui/games/steam/default.nix @@ -0,0 +1,27 @@ +{ + pkgs, + lib, + config, + ... +}: { + options = { + games.enable = lib.mkEnableOption ""; + }; + config = lib.mkIf config.games.enable { + nixpkgs.config.allowUnfreePredicate = pkg: + builtins.elem (lib.getName pkg) [ + "steam-original" + "steam" + "steam-run" + ]; + programs.steam.enable = true; + environment.systemPackages = with pkgs; [ + prismlauncher + dolphin-emu + zulu17 + mangohud + lutris + ]; + }; +} + diff --git a/modules/apps/gui/games/suyu/default.nix b/modules/apps/gui/games/suyu/default.nix new file mode 100644 index 0000000..76936da --- /dev/null +++ b/modules/apps/gui/games/suyu/default.nix @@ -0,0 +1,33 @@ +{pkgs, ...}: let + customPkgs = + pkgs + // { + suyu = pkgs.appimageTools.wrapType1 { + name = "suyu"; + version = "0.0.3"; + + src = pkgs.fetchurl { + url = "https://git.suyu.dev/suyu/suyu/releases/download/v0.0.3/Suyu-Linux_x86_64.AppImage"; + hash = "sha256-26sWhTvB6K1i/K3fmwYg5pDIUi+7xs3dz8yVj5q7H0c="; + }; + }; + }; +in { + environment.systemPackages = [ + customPkgs.suyu + ]; + + home-manager.users.joy.xdg = { + desktopEntries = { + suyu = { + name = "Suyu"; + exec = "suyu"; + icon = "suyu"; + terminal = false; + type = "Application"; + categories = ["Game" "Emulator"]; + mimeType = ["text/plain"]; + }; + }; + }; +} diff --git a/modules/apps/gui/games/suyu/logo.svg b/modules/apps/gui/games/suyu/logo.svg new file mode 100644 index 0000000..381d5a5 --- /dev/null +++ b/modules/apps/gui/games/suyu/logo.svg @@ -0,0 +1,4 @@ + + + +