diff --git a/home/shahab/common/optional/misc-packages.nix b/home/shahab/common/optional/misc-packages.nix index 69fd608..35fa402 100644 --- a/home/shahab/common/optional/misc-packages.nix +++ b/home/shahab/common/optional/misc-packages.nix @@ -2,14 +2,12 @@ { home.packages = with pkgs; [ - discord lazygit gh dbeaver-bin cloudflare-warp protonmail-desktop protonvpn-gui - cloudflare-warp kubectl k9s postgresql_17 diff --git a/home/shahab/specialisations/gaming.nix b/home/shahab/specialisations/gaming.nix new file mode 100644 index 0000000..acb4ea9 --- /dev/null +++ b/home/shahab/specialisations/gaming.nix @@ -0,0 +1,12 @@ +{ pkgs, ... }: + +{ + home.packages = with pkgs; [ + discord + protonmail-desktop + protonvpn-gui + kitty + waybar + prismlauncher + ]; +} diff --git a/hosts/common/specialisations/gaming.nix b/hosts/common/specialisations/gaming.nix index 2c062f3..acd5555 100644 --- a/hosts/common/specialisations/gaming.nix +++ b/hosts/common/specialisations/gaming.nix @@ -1,6 +1,7 @@ -{ pkgs, ... }: - -{ +{ pkgs, config, lib, ... }: +let + hostSpec = config.hostSpec; +in { specialisation.gaming.configuration = { programs = { steam = { @@ -13,8 +14,16 @@ gamemode.enable = true; }; + home-manager.users."${hostSpec.username}".imports = lib.flatten [ + ({ config, ... }: + import (lib.custom.relativeToRoot + "home/${hostSpec.username}/specialisations/gaming.nix") { + inherit pkgs; + }) + ]; + powerManagement.cpuFreqGovernor = "performance"; - environment.systemPackages = with pkgs; [ mangohud protonup-qt prismlauncher ]; + environment.systemPackages = with pkgs; [ mangohud protonup-qt ]; }; } diff --git a/hosts/common/specialisations/powersave.nix b/hosts/common/specialisations/powersave.nix deleted file mode 100644 index 630cdbf..0000000 --- a/hosts/common/specialisations/powersave.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ ... }: - -{ - specialisation.powersave.configuration = { - services.power-profiles-daemon.enable = false; - - services.tlp = { - enable = true; - - settings = { - CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; - CPU_SCALING_GOVERNOR_ON_AC = "powersave"; - CPU_ENERGY_PREF_ON_BAT = "power"; - CPU_ENERGY_PREF_ON_AC = "power"; - - CPU_BOOST_ON_AC = 1; - CPU_BOOST_ON_BAT = 0; - - CPU_HWP_DYN_BOOST_ON_AC=1; - CPU_HWP_DYN_BOOST_ON_BAT=0; - - CPU_MIN_PERF_ON_BAT = 0; - CPU_MIN_PERF_ON_AC = 0; - CPU_MAX_PERF_ON_BAT = 20; - CPU_MAX_PERF_ON_AC = 100; - - AMDGPU_ABM_LEVEL_ON_AC=0; - AMDGPU_ABM_LEVEL_ON_BAT=3; - - PLATFORM_PROFILE_ON_AC="performance"; - PLATFORM_PROFILE_ON_BAT="low-power"; - - START_CHARGE_THRESH_BAT0 = 20; - STOP_CHARGE_THRESH_BAT0 = 80; - }; - }; - }; -} diff --git a/hosts/nixos/rihla/default.nix b/hosts/nixos/rihla/default.nix index 1641efd..337719a 100644 --- a/hosts/nixos/rihla/default.nix +++ b/hosts/nixos/rihla/default.nix @@ -70,7 +70,6 @@ (map (s: lib.custom.relativeToRoot "hosts/common/specialisations/${s}.nix") [ "gaming" - "powersave" ]) ];