summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorseth <[email protected]>2023-08-25 09:38:56 -0400
committerseth <[email protected]>2023-08-25 09:48:58 -0400
commit5390cd181632dbadd9984a23a64f104affcccc54 (patch)
tree87ac7c45f8365713db143fbb3f38fa66e8777c92
parent6486faa521a522a4fdd81a409599cdbae6cb0c71 (diff)
hosts/glados: switch to amd_pstate_epp powersave balance_performance
-rw-r--r--hosts/glados/boot.nix8
-rw-r--r--hosts/glados/default.nix31
2 files changed, 24 insertions, 15 deletions
diff --git a/hosts/glados/boot.nix b/hosts/glados/boot.nix
index 9ab10d6..4a9af4e 100644
--- a/hosts/glados/boot.nix
+++ b/hosts/glados/boot.nix
@@ -12,13 +12,6 @@
initrd.systemd.enable = true;
kernelPackages = pkgs.linuxPackages_latest;
- kernel.sysctl = {
- "vm.swappiness" = 100;
- "vm.vfs_cache_pressure" = 500;
- "vm.dirty_background_ratio" = 1;
- "vm.dirty_ratio" = 50;
- };
-
bootspec.enable = true;
loader.systemd-boot.enable = lib.mkForce false;
@@ -26,6 +19,7 @@
enable = true;
pkiBundle = "/etc/secureboot";
};
+
supportedFilesystems = ["btrfs" "ntfs"];
};
}
diff --git a/hosts/glados/default.nix b/hosts/glados/default.nix
index 1a25561..de2c1d5 100644
--- a/hosts/glados/default.nix
+++ b/hosts/glados/default.nix
@@ -1,4 +1,4 @@
-_: {
+{lib, ...}: {
imports = [
./boot.nix
./hardware-configuration.nix
@@ -6,6 +6,16 @@ _: {
../../modules/nixos/features/virtualisation.nix
];
+ boot = {
+ kernelParams = ["amd_pstate=active"];
+ kernel.sysctl = {
+ "vm.swappiness" = 100;
+ "vm.vfs_cache_pressure" = 500;
+ "vm.dirty_background_ratio" = 1;
+ "vm.dirty_ratio" = 50;
+ };
+ };
+
desktop.gnome.enable = true;
features = {
@@ -14,16 +24,11 @@ _: {
};
hardware = {
- enable = true;
nvidia.enable = true;
+ ssd.enable = true;
};
- environment.etc."environment".text = ''
- LIBVA_DRIVER_NAME=vdpau
- '';
-
networking.hostName = "glados";
- powerManagement.cpuFreqGovernor = "ondemand";
security.tpm2 = {
enable = true;
@@ -35,7 +40,17 @@ _: {
fwupd.enable = true;
};
- systemd.services."prepare-kexec".wantedBy = ["multi-user.target"];
+ systemd = {
+ services."prepare-kexec".wantedBy = ["multi-user.target"];
+ tmpfiles.rules = let
+ nproc = 12;
+ in
+ builtins.map
+ (n: "w /sys/devices/system/cpu/cpu${builtins.toString n}/cpufreq/energy_performance_preference - - - - ${"balance_performance"}")
+ (lib.range 0 (nproc - 1));
+ };
+
+ powerManagement.cpuFreqGovernor = "powersave";
zramSwap = {
enable = true;