Gen 444: Consolidated desktop/laptop configs into one, differing options are declared in hosts folder

This commit is contained in:
pagedMov
2024-10-13 01:31:11 -04:00
parent 07cb5136ee
commit 1379e5a8ef
145 changed files with 21 additions and 4215 deletions

63
hosts/laptop/default.nix Normal file
View File

@@ -0,0 +1,63 @@
{ inputs, pkgs, config, self, username, ... }:
{
imports = [
./../../modules/sys
./hardware.nix
];
environment.systemPackages = with pkgs; [
acpi
brightnessctl
cpupower-gui
powertop
];
services = {
power-profiles-daemon.enable = true;
upower = {
enable = true;
percentageLow = 20;
percentageCritical = 5;
percentageAction = 3;
criticalPowerAction = "PowerOff";
};
tlp.settings = {
CPU_ENERGY_PERF_POLICY_ON_AC = "power";
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
CPU_BOOST_ON_AC = 1;
CPU_BOOST_ON_BAT = 1;
CPU_HWP_DYN_BOOST_ON_AC = 1;
CPU_HWP_DYN_BOOST_ON_BAT = 1;
PLATFORM_PROFILE_ON_AC = "performance";
PLATFORM_PROFILE_ON_BAT = "performance";
INTEL_GPU_MIN_FREQ_ON_AC=500;
INTEL_GPU_MIN_FREQ_ON_BAT=500;
# INTEL_GPU_MAX_FREQ_ON_AC=0;
# INTEL_GPU_MAX_FREQ_ON_BAT=0;
# INTEL_GPU_BOOST_FREQ_ON_AC=0;
# INTEL_GPU_BOOST_FREQ_ON_BAT=0;
PCIE_ASPM_ON_AC = "default";
PCIE_ASPM_ON_BAT = "powersupersave";
};
};
powerManagement.cpuFreqGovernor = "performance";
boot = {
kernelModules = ["acpi_call"];
extraModulePackages = with config.boot.kernelPackages;
[
acpi_call
cpupower
]
++ [pkgs.cpupower-gui];
};
}

55
hosts/laptop/hardware.nix Normal file
View File

@@ -0,0 +1,55 @@
# 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, lib, modulesPath, username, ... }:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "uas" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/a687e4e2-8665-43f1-9d62-3e3f21423579";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/6EAD-2C48";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
fileSystems."/home" =
{ device = "/dev/nvme0n1p5";
fsType = "ext4";
};
fileSystems."/home/${username}/steamlib" =
{ device = "/dev/nvme0n1p1";
fsType = "ext4";
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp14s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp15s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware = {
cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
keyboard.uhk.enable = true;
amdgpu.amdvlk.enable = true;
bluetooth = {
enable = true;
powerOnBoot = true;
};
};
}