diff --git a/flake.nix b/flake.nix index ded9282..ff0dd48 100644 --- a/flake.nix +++ b/flake.nix @@ -22,9 +22,19 @@ inputs.nixpkgs.follows = "nixpkgs"; inputs.quickshell.follows = "quickshell"; }; + + nix-gaming = { + url = "github:fufexan/nix-gaming"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; - outputs = { self, nixpkgs, mango, quickshell, noctalia, ... }@inputs: + outputs = { self, nixpkgs, mango, quickshell, noctalia, nix-gaming, home-manager, ... }@inputs: let system = "x86_64-linux"; lib = nixpkgs.lib; @@ -38,6 +48,13 @@ ./hosts/atlas/hardware-configuration.nix ./modules/common.nix mangoModule + # Home Manager module - Foundation for user-level package management + # User-specific configurations can be added via home-manager.users. + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + } ]; in { nixosConfigurations = { diff --git a/modules/common.nix b/modules/common.nix index 2f8914f..cb1413e 100644 --- a/modules/common.nix +++ b/modules/common.nix @@ -23,6 +23,19 @@ networking.networkmanager.enable = true; + # Memory compression (reduces swap usage) + zramSwap = { + enable = true; + algorithm = "zstd"; + memoryPercent = 50; + }; + + # Firmware updates + services.fwupd.enable = true; + + # Power profiles daemon (for laptop/power management) + services.power-profiles-daemon.enable = true; + # -------------------------------------------------------------------------- # AMD GPU - RDNA 4 (RX 9060 XT) + Zen 3 CPU (5700G) # -------------------------------------------------------------------------- @@ -162,6 +175,13 @@ alsa.enable = true; alsa.support32Bit = true; pulse.enable = true; + + # Low-latency configuration for gaming + lowLatency = { + enable = true; + quantum = 64; # Buffer size (lower = less latency) + rate = 48000; # Sample rate + }; }; # Disable PulseAudio (conflicts with PipeWire) diff --git a/modules/dev.nix b/modules/dev.nix index 2f4dca4..55c183e 100644 --- a/modules/dev.nix +++ b/modules/dev.nix @@ -38,6 +38,8 @@ # -- Git -- lazygit gh # GitHub CLI + delta # Git diff viewer + meld # Visual diff tool # -- Node.js -- nodejs_22 @@ -54,10 +56,11 @@ bat # cat alternative fzf # Fuzzy finder zoxide # cd alternative - delta # Git diff viewer - # -- Database Clients -- + # -- Database & API Tools -- postgresql # psql client + dbeaver-bin # Database GUI + insomnia # API testing # redis # Uncomment if needed # -- Misc -- diff --git a/modules/gaming.nix b/modules/gaming.nix index e3f207b..b93f913 100644 --- a/modules/gaming.nix +++ b/modules/gaming.nix @@ -1,9 +1,18 @@ -{ pkgs, ... }: +{ pkgs, inputs, ... }: { # Identification tags (shows in boot menu) system.nixos.tags = [ "gaming" "zen" ]; + # -------------------------------------------------------------------------- + # NIX-GAMING PLATFORM OPTIMIZATIONS + # -------------------------------------------------------------------------- + imports = [ + inputs.nix-gaming.nixosModules.platformOptimisations + ]; + + nix-gaming.platformOptimisations.enable = true; + # -------------------------------------------------------------------------- # KERNEL - Zen for gaming performance # -------------------------------------------------------------------------- @@ -62,6 +71,7 @@ # -- Performance Overlays -- mangohud # FPS counter, GPU stats goverlay # MangoHud GUI config + vkbasalt # Vulkan post-processing (sharpening, CAS) # -- Game Launchers -- lutris # Multi-platform launcher @@ -76,6 +86,10 @@ # -- Utilities -- gamescope # Micro-compositor for gaming corectrl # AMD GPU control GUI + lact # Linux AMDGPU Control Tool (alternative to CoreCtrl) + + # -- Communication -- + discord # Voice chat and gaming communities # -- Optional Game Clients -- # prismlauncher # Minecraft