From 87f1cd43f5bc9d4f016c4e0885ae00f9fcfa8c0a Mon Sep 17 00:00:00 2001 From: joy Date: Sat, 21 Sep 2024 09:44:32 +0200 Subject: [PATCH] games --- hosts/desktop/default.nix | 4 +--- modules/apps/cli/helix/default.nix | 7 ++++++- modules/apps/gui/default.nix | 1 - modules/apps/gui/games/default.nix | 6 ++++-- modules/apps/gui/games/mangohud/default.nix | 3 +++ modules/apps/gui/games/mics/default.nix | 8 ++++++++ modules/apps/gui/games/norisk/default.nix | 8 ++++++-- modules/apps/gui/games/steam/default.nix | 15 +-------------- 8 files changed, 29 insertions(+), 23 deletions(-) create mode 100644 modules/apps/gui/games/mangohud/default.nix create mode 100644 modules/apps/gui/games/mics/default.nix diff --git a/hosts/desktop/default.nix b/hosts/desktop/default.nix index 585c4a0..56ea339 100644 --- a/hosts/desktop/default.nix +++ b/hosts/desktop/default.nix @@ -1,12 +1,10 @@ {...}: { networking.hostName = "desktop"; services.hardware.openrgb.enable = true; - services.ollama.enable = true; - - games.enable = true; imports = [ ../../modules ./hardware.nix + ../../modules/apps/gui/games ]; } diff --git a/modules/apps/cli/helix/default.nix b/modules/apps/cli/helix/default.nix index d69dd15..8d6cc73 100644 --- a/modules/apps/cli/helix/default.nix +++ b/modules/apps/cli/helix/default.nix @@ -8,10 +8,15 @@ defaultEditor = true; settings = { theme = lib.mkForce "gruvbox"; + editor = { + line-number = "relative"; + shell = ["zsh" "-c"]; + }; keys.normal = { - space.space = "file_picker"; Z.Z = ":wq"; Z.Q = ":q!"; + space.space = "file_picker"; + esc = [ "collapse_selection" "keep_primary_selection" ]; }; }; }; diff --git a/modules/apps/gui/default.nix b/modules/apps/gui/default.nix index 8740c07..757d741 100644 --- a/modules/apps/gui/default.nix +++ b/modules/apps/gui/default.nix @@ -2,7 +2,6 @@ imports = [ ./mpv ./code - ./games ./nemo ./rofi ./firefox diff --git a/modules/apps/gui/games/default.nix b/modules/apps/gui/games/default.nix index 520e42b..88cc626 100644 --- a/modules/apps/gui/games/default.nix +++ b/modules/apps/gui/games/default.nix @@ -1,7 +1,9 @@ { - imports = [ + imports = [ ./suyu ./steam ./norisk - ]; + ./mangohud + ./mics + ]; } diff --git a/modules/apps/gui/games/mangohud/default.nix b/modules/apps/gui/games/mangohud/default.nix new file mode 100644 index 0000000..9d96098 --- /dev/null +++ b/modules/apps/gui/games/mangohud/default.nix @@ -0,0 +1,3 @@ +{...}: { + home-manager.users.joy.programs.mangohud.enable = true; +} diff --git a/modules/apps/gui/games/mics/default.nix b/modules/apps/gui/games/mics/default.nix new file mode 100644 index 0000000..819aa1c --- /dev/null +++ b/modules/apps/gui/games/mics/default.nix @@ -0,0 +1,8 @@ +{pkgs, ...}: { + environment.systemPackages = with pkgs; [ + prismlauncher + zulu17 + dolphin-emu + lutris-free + ]; +} diff --git a/modules/apps/gui/games/norisk/default.nix b/modules/apps/gui/games/norisk/default.nix index 4d0d7ca..980b249 100644 --- a/modules/apps/gui/games/norisk/default.nix +++ b/modules/apps/gui/games/norisk/default.nix @@ -1,4 +1,8 @@ -{lib, pkgs, ...}: let +{ + lib, + pkgs, + ... +}: let customPkgs = pkgs // { @@ -19,7 +23,7 @@ in { home-manager.users.joy.xdg = { desktopEntries = { - NoRiskClient= { + NoRiskClient = { name = "NoRisk Client"; exec = "noriskclient"; icon = lib.mkForce "/home/joy/nix/modules/apps/gui/games/norisk/norisk.png"; diff --git a/modules/apps/gui/games/steam/default.nix b/modules/apps/gui/games/steam/default.nix index 5e68e72..318c756 100644 --- a/modules/apps/gui/games/steam/default.nix +++ b/modules/apps/gui/games/steam/default.nix @@ -1,13 +1,7 @@ { - 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" @@ -15,12 +9,5 @@ "steam-run" ]; programs.steam.enable = true; - environment.systemPackages = with pkgs; [ - prismlauncher - dolphin-emu - zulu17 - mangohud - lutris - ]; - }; + services.joycond.enable = true; }