framework setup

This commit is contained in:
Kopatz
2025-04-28 15:38:34 +02:00
parent 041bfd26aa
commit 61d6e8c876
6 changed files with 23 additions and 21 deletions

View File

@@ -1,4 +1,5 @@
{ config, pkgs, inputs, ... }: {
{ config, pkgs, inputs, lib, ... }:
{
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
@@ -16,19 +17,9 @@
## -- set in flake.nix
#<nixos-hardware/dell/xps/15-7590/nvidia>
#<home-manager/nixos>
inputs.nixos-hardware.nixosModules.dell-xps-15-7590
inputs.nixos-hardware.nixosModules.framework-13-7040-amd
];
specialisation.nvidia = {
configuration = {
imports = [ inputs.nixos-hardware.nixosModules.dell-xps-15-7590-nvidia ];
hardware.nvidia.package =
config.boot.kernelPackages.nvidiaPackages.production;
hardware.nvidia.open = false;
};
};
#services.blueman.enable = true;
#hardware.bluetooth.enable = true; # enables support for Bluetooth
@@ -37,8 +28,8 @@
age.identityPaths =
[ "/home/kopatz/.ssh/id_ed25519" "/etc/ssh/ssh_host_ed25519_key" ];
mainUser.layout = "at";
mainUser.variant = "";
mainUser.layout = "de";
mainUser.variant = "us";
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;

View File

@@ -9,9 +9,11 @@
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "uas" "sd_mod" "rtsx_pci_sdmmc" ];
# boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "uas" "sd_mod" "rtsx_pci_sdmmc" "thunderbolt"];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
@@ -37,5 +39,5 @@
# networking.interfaces.wlp59s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View File

@@ -15,8 +15,8 @@
CPU_SCALING_GOVERNOR_ON_AC = "performance";
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
#CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
CPU_ENERGY_PERF_POLICY_ON_BAT = "balance_power";
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
#CPU_ENERGY_PERF_POLICY_ON_BAT = "balance_power";
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
CPU_MIN_PERF_ON_AC = 0;