diff --git a/flake.lock b/flake.lock index 8139e88..323fd5e 100644 --- a/flake.lock +++ b/flake.lock @@ -321,11 +321,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1697456312, - "narHash": "sha256-roiSnrqb5r+ehnKCauPLugoU8S36KgmWraHgRqVYndo=", + "lastModified": 1697723726, + "narHash": "sha256-SaTWPkI8a5xSHX/rrKzUe+/uVNy6zCGMXgoeMb7T9rg=", "owner": "nixos", "repo": "nixpkgs", - "rev": "ca012a02bf8327be9e488546faecae5e05d7d749", + "rev": "7c9cc5a6e5d38010801741ac830a3f8fd667a7a0", "type": "github" }, "original": { diff --git a/nixos/foxtrot/default.nix b/nixos/foxtrot/default.nix index 3ff76a1..7e4cd1a 100644 --- a/nixos/foxtrot/default.nix +++ b/nixos/foxtrot/default.nix @@ -26,8 +26,6 @@ inputs.hardware.nixosModules.common-pc-laptop-ssd ]; - nixpkgs.overlays = [outputs.overlays.modifications]; - # TODO: hibernation? does sleep suffice? # TODO: perform a hardware scan @@ -36,6 +34,7 @@ efi.canTouchEfiVariables = true; systemd-boot.enable = true; }; + kernelPackages = pkgs.linuxPackages_6_5; kernelParams = ["amdgpu.sg_display=0"]; initrd.availableKernelModules = ["xhci_pci" "nvme" "thunderbolt"]; kernelModules = ["kvm-amd"]; @@ -43,22 +42,23 @@ hardware.bluetooth.enable = true; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; services.printing.enable = true; + services.power-profiles-daemon.enable = false; + services.tlp = { + enable = true; + settings = { + CPU_SCALING_GOVERNOR_ON_AC = "performance"; + CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; - boot.supportedFilesystems = - pkgs.lib.mkForce ["btrfs" "cifs" "f2fs" "jfs" "ntfs" "reiserfs" "vfat" "xfs"]; + CPU_ENERGY_PERF_POLICY_ON_BAT = "power"; + CPU_ENERGY_PERF_POLICY_ON_AC = "performance"; - boot.kernelPackages = pkgs.linuxPackagesFor ( - pkgs.linux_6_5.override { - argsOverride = { - src = pkgs.fetchurl { - url = "https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.5.7.tar.xz"; - sha256 = "sha256-DQnqRIAFyc/lOD5Mcqhys5GIuSj4xE4UawOxt4Ufu4w="; - }; - version = "6.5.7"; - modDirVersion = "6.5.7"; - }; - } - ); + CPU_MIN_PERF_ON_AC = 0; + CPU_MAX_PERF_ON_AC = 100; + CPU_MIN_PERF_ON_BAT = 0; + CPU_MAX_PERF_ON_BAT = 20; + }; + }; + powerManagement.powertop.enable = true; networking = { firewall = { diff --git a/overlays/default.nix b/overlays/default.nix index ad60137..85a4d03 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -6,10 +6,6 @@ # You can change versions, add patches, set compilation flags, anything really. # https://nixos.wiki/wiki/Overlays modifications = final: prev: { - linux_6_5 = prev.linux_6_5.override { - patches = []; - kernelPatches = []; - }; }; # When applied, the unstable nixpkgs set (declared in the flake inputs) will