From 4ebe8cc8ba7670d9d0a8446b5142e56db7610000 Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Tue, 31 Jan 2023 17:20:23 +0100 Subject: [PATCH] Also add some power management to mimir --- machines/mimir/configuration.nix | 4 ++++ machines/mimir/hardware-configuration.nix | 14 +++----------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/machines/mimir/configuration.nix b/machines/mimir/configuration.nix index 4adbdbb..c5b170c 100644 --- a/machines/mimir/configuration.nix +++ b/machines/mimir/configuration.nix @@ -108,6 +108,10 @@ "miniflux" ]; + powerManagement = { + cpuFreqGovernor = "ondemand"; + }; + systemd.network = { enable = true; diff --git a/machines/mimir/hardware-configuration.nix b/machines/mimir/hardware-configuration.nix index 9b7bcf2..f8d3d94 100644 --- a/machines/mimir/hardware-configuration.nix +++ b/machines/mimir/hardware-configuration.nix @@ -1,19 +1,11 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ -# and may be overwritten by future invocations. Please make changes -# to /etc/nixos/configuration.nix instead. -{ config, pkgs, ... }: - -{ - boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" ]; +{ config, pkgs, ... }: { + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; boot.initrd.kernelModules = [ "dm-snapshot" ]; boot.kernelModules = [ "kvm-amd" "apple-mfi-fastcharge" "zenpower" ]; + boot.kernelParams = [ "amd_pstate.shared_mem=1" ]; boot.extraModulePackages = [ ] ++ (with config.boot.kernelPackages; [ rtl88x2bu zenpower ]); - boot.extraModprobeConfig = '' - options amd-pstate shared_mem=true - ''; - fileSystems."/" = { device = "/dev/disk/by-label/nixos"; fsType = "ext4";