~cyplo/dotfiles

05bf116055ccfdc821a00b81cdaa205cc11c570e — Cyryl Płotnicki 2 months ago 2cfef06
fix throttled on T480 hardened
M nixos/boxes/foureighty/custom-kernel.nix => nixos/boxes/foureighty/custom-kernel.nix +6 -1
@@ 1,6 1,10 @@
{ config, pkgs, ... }:
{
  powerManagement.cpuFreqGovernor = "ondemand";
  boot.kernelPackages = pkgs.linuxPackages_latest_hardened;
  nixpkgs.overlays = [ (self: super: { buildLinux = x: super.buildLinux ({
    ignoreConfigErrors = true;
    enableParallelBuilding = true;
  } // x); } ) ];
  boot.kernelPatches = [ {
    name = "foureighty";
    patch = null;


@@ 20,6 24,7 @@

      STRICT_KERNEL_RWX  y

      DEVMEM y
      STRICT_DEVMEM y
      DEBUG_CREDENTIALS     y
      DEBUG_NOTIFIERS       y

M nixos/boxes/foureighty/default.nix => nixos/boxes/foureighty/default.nix +5 -2
@@ 1,9 1,10 @@
{ config, pkgs, inputs, ... }:
{ config, pkgs, inputs, lib, ... }:
{
  networking.hostName = "foureighty";

  imports = [
    inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t480
    ./custom-kernel.nix
    ./hardware-configuration.nix
    ./nvidia.nix
    ../../boot.nix


@@ 29,11 30,13 @@
    memoryPercent = 75;
  };

  boot.kernelPackages = pkgs.linuxPackages_latest_hardened;
  time.timeZone = "Europe/London";

  hardware.trackpoint.enable = true;
  services.hardware.bolt.enable = true;
  powerManagement.cpuFreqGovernor = lib.mkForce "ondemand";
  hardware.video.hidpi.enable = lib.mkDefault true;

  services.fprintd = {
    enable = true;
  };

M nixos/boxes/foureighty/hardware-configuration.nix => nixos/boxes/foureighty/hardware-configuration.nix +0 -3
@@ 26,9 26,6 @@

  swapDevices = [ ];

  powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
  hardware.video.hidpi.enable = lib.mkDefault true;

  nix.maxJobs = 2;
  nix.buildCores = 6;
}

M nixos/boxes/skinnyv/default.nix => nixos/boxes/skinnyv/default.nix +1 -0
@@ 21,5 21,6 @@
  boot.loader.efi.canTouchEfiVariables = true;
  time.timeZone = "Europe/London";

  services.thermald.enable = true;
  fonts.fontconfig.enable = true;
}

M nixos/common-hardware.nix => nixos/common-hardware.nix +0 -1
@@ 55,6 55,5 @@
  };

  powerManagement.enable = (lib.mkForce true);
  powerManagement.cpuFreqGovernor = (lib.mkForce null);
  powerManagement.powertop.enable = true;
}