diff --git a/flake.nix b/flake.nix index a6e8706..e71e96a 100644 --- a/flake.nix +++ b/flake.nix @@ -1,5 +1,5 @@ { - description = "Wayming - Gaming setup for Wayland with configurable options and working defaults"; + description = "Play - Gaming setup for Wayland with configurable options and working defaults"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; @@ -27,10 +27,10 @@ overlays = [ self.overlays.default ]; }; - # Extend lib with wayming utilities + # Extend lib with play utilities lib = nixpkgs.lib.extend ( final: prev: { - wayming = import ./lib { lib = final; }; + play = import ./lib { lib = final; }; } ); @@ -46,11 +46,11 @@ } ) // { - homeManagerModules.wayming = import ./modules/home-manager.nix; - nixosModules.wayming = import ./modules/nixos.nix; + homeManagerModules.play = import ./modules/home-manager.nix; + nixosModules.play = import ./modules/nixos.nix; # Default module (home-manager) - homeManagerModules.default = self.homeManagerModules.wayming; + homeManagerModules.default = self.homeManagerModules.play; # Overlay for packages overlays.default = final: prev: { diff --git a/lib/defualt.nix b/lib/defualt.nix index ad2f4b7..97a59ac 100644 --- a/lib/defualt.nix +++ b/lib/defualt.nix @@ -26,27 +26,27 @@ getMonitorDefaults = monitors: { WIDTH = let - pm = lib.wayming.getPrimaryMonitor monitors; + pm = lib.play.getPrimaryMonitor monitors; in if pm != null then pm.width else 1920; HEIGHT = let - pm = lib.wayming.getPrimaryMonitor monitors; + pm = lib.play.getPrimaryMonitor monitors; in if pm != null then pm.height else 1080; REFRESH_RATE = let - pm = lib.wayming.getPrimaryMonitor monitors; + pm = lib.play.getPrimaryMonitor monitors; in if pm != null then pm.refreshRate else 60; VRR = let - pm = lib.wayming.getPrimaryMonitor monitors; + pm = lib.play.getPrimaryMonitor monitors; in if pm != null then pm.vrr else false; HDR = let - pm = lib.wayming.getPrimaryMonitor monitors; + pm = lib.play.getPrimaryMonitor monitors; in if pm != null then pm.hdr else false; }; diff --git a/modules/home/gamescoperun.nix b/modules/home/gamescoperun.nix index a9290c0..63bef27 100644 --- a/modules/home/gamescoperun.nix +++ b/modules/home/gamescoperun.nix @@ -7,13 +7,13 @@ }: let - cfg = config.wayming.gamescoperun; + cfg = config.play.gamescoperun; # Use shared lib functions - inherit (lib.wayming) toCliArgs toEnvCommands getMonitorDefaults; + inherit (lib.play) toCliArgs toEnvCommands getMonitorDefaults; # Get monitor defaults - monitorDefaults = getMonitorDefaults config.wayming.monitors; + monitorDefaults = getMonitorDefaults config.play.monitors; inherit (monitorDefaults) WIDTH HEIGHT @@ -132,7 +132,7 @@ let in { - options.wayming.gamescoperun = { + options.play.gamescoperun = { enable = lib.mkEnableOption "gamescoperun, a wrapper for gamescope"; useGit = lib.mkOption { @@ -195,12 +195,12 @@ in # Assertion to ensure monitors are configured if gamescoperun is enabled assertions = [ { - assertion = cfg.enable -> (lib.length config.wayming.monitors > 0); - message = "wayming.gamescoperun requires at least one monitor to be configured in wayming.monitors"; + assertion = cfg.enable -> (lib.length config.play.monitors > 0); + message = "play.gamescoperun requires at least one monitor to be configured in play.monitors"; } { - assertion = cfg.enable -> (lib.length (lib.filter (m: m.primary) config.wayming.monitors) == 1); - message = "wayming.gamescoperun requires exactly one primary monitor to be configured"; + assertion = cfg.enable -> (lib.length (lib.filter (m: m.primary) config.play.monitors) == 1); + message = "play.gamescoperun requires exactly one primary monitor to be configured"; } ]; }; diff --git a/modules/home/monitors.nix b/modules/home/monitors.nix index 63f077e..85c26ec 100644 --- a/modules/home/monitors.nix +++ b/modules/home/monitors.nix @@ -1,6 +1,6 @@ { lib, config, ... }: { - options.wayming.monitors = lib.mkOption { + options.play.monitors = lib.mkOption { type = lib.types.listOf ( lib.types.submodule { options = { @@ -64,8 +64,8 @@ assertions = [ { assertion = - ((lib.length config.wayming.monitors) != 0) - -> ((lib.length (lib.filter (m: m.primary) config.wayming.monitors)) == 1); + ((lib.length config.play.monitors) != 0) + -> ((lib.length (lib.filter (m: m.primary) config.play.monitors)) == 1); message = "Exactly one monitor must be set to primary."; } ]; diff --git a/modules/home/wrapper.nix b/modules/home/wrapper.nix index 0161563..2352970 100644 --- a/modules/home/wrapper.nix +++ b/modules/home/wrapper.nix @@ -6,10 +6,10 @@ }: let - cfg = config.wayming.wrappers; + cfg = config.play.wrappers; # Use shared lib function - inherit (lib.wayming) toCliArgs; + inherit (lib.play) toCliArgs; # Function to create a wrapper for an application mkWrapper = @@ -36,14 +36,14 @@ let ${envExports} # Execute with gamescoperun - exec ${lib.getExe config.wayming.gamescoperun.package} ${extraArgs} ${lib.getExe originalPackage} $argv + exec ${lib.getExe config.play.gamescoperun.package} ${extraArgs} ${lib.getExe originalPackage} $argv ''; in wrapperScript; in { - options.wayming.wrappers = lib.mkOption { + options.play.wrappers = lib.mkOption { type = lib.types.attrsOf ( lib.types.submodule ( { name, ... }: @@ -96,7 +96,7 @@ in wrappedPackage = lib.mkOption { type = lib.types.package; readOnly = true; - default = mkWrapper name config.wayming.wrappers.${name}; + default = mkWrapper name config.play.wrappers.${name}; description = "The configured wrapper package for this application"; }; }; @@ -113,6 +113,6 @@ in ); # Ensure gamescoperun is enabled if any wrappers are enabled - wayming.gamescoperun.enable = lib.mkIf (lib.length (lib.attrNames cfg) > 0) true; + play.gamescoperun.enable = lib.mkIf (lib.length (lib.attrNames cfg) > 0) true; }; } diff --git a/modules/nixos/amd.nix b/modules/nixos/amd.nix index 6dae21c..3690c2b 100644 --- a/modules/nixos/amd.nix +++ b/modules/nixos/amd.nix @@ -6,10 +6,10 @@ }: let - cfg = config.wayming.amd; + cfg = config.play.amd; in { - options.wayming.amd = { + options.play.amd = { enable = lib.mkEnableOption "AMD GPU configuration with LACT (Linux AMD Control Tool)"; }; diff --git a/modules/nixos/ananicy.nix b/modules/nixos/ananicy.nix index 9fc0ab0..73e405d 100644 --- a/modules/nixos/ananicy.nix +++ b/modules/nixos/ananicy.nix @@ -6,7 +6,7 @@ }: let - cfg = config.wayming.ananicy; + cfg = config.play.ananicy; # Default extra rules for gaming processes defaultExtraRules = [ @@ -20,7 +20,7 @@ let finalExtraRules = defaultExtraRules ++ cfg.extraRules; in { - options.wayming.ananicy = { + options.play.ananicy = { enable = lib.mkEnableOption "ananicy process scheduler optimization"; extraRules = lib.mkOption { diff --git a/modules/nixos/gamemode.nix b/modules/nixos/gamemode.nix index 77be221..3884f91 100644 --- a/modules/nixos/gamemode.nix +++ b/modules/nixos/gamemode.nix @@ -6,10 +6,10 @@ }: let - cfg = config.wayming.gamemode; + cfg = config.play.gamemode; in { - options.wayming.gamemode = { + options.play.gamemode = { enable = lib.mkEnableOption "gamemode configuration for gaming optimization"; settings = lib.mkOption { diff --git a/modules/nixos/lutris.nix b/modules/nixos/lutris.nix index 2099762..3434d06 100644 --- a/modules/nixos/lutris.nix +++ b/modules/nixos/lutris.nix @@ -6,7 +6,7 @@ }: let - cfg = config.wayming.lutris; + cfg = config.play.lutris; # Default extra packages defaultExtraPkgs = with pkgs; [ @@ -22,7 +22,7 @@ let }; in { - options.wayming.lutris = { + options.play.lutris = { enable = lib.mkEnableOption "Install Lutris game manager"; extraPkgs = lib.mkOption { diff --git a/modules/nixos/steam.nix b/modules/nixos/steam.nix index 11aba95..29e9616 100644 --- a/modules/nixos/steam.nix +++ b/modules/nixos/steam.nix @@ -6,7 +6,7 @@ }: let - cfg = config.wayming.steam; + cfg = config.play.steam; # Default compatibility packages defaultCompatPackages = with pkgs; [ @@ -23,7 +23,7 @@ let }; in { - options.wayming.steam = { + options.play.steam = { enable = lib.mkEnableOption "Steam with gaming optimizations"; extraCompatPackages = lib.mkOption {