Use nixos-hardware to set some hardware specific stuff

This commit is contained in:
Erwin Boskma 2022-07-02 19:09:47 +02:00
parent 1c9931fda2
commit 30209e952d
Signed by: erwin
GPG key ID: 270B20D17394F7E5
3 changed files with 12 additions and 14 deletions

View file

@ -11,6 +11,8 @@
flake-utils.url = "github:numtide/flake-utils";
nixos-hardware.url = github:NixOS/nixos-hardware;
nixos-generators = {
url = "github:nix-community/nixos-generators";
inputs.nixpkgs.follows = "nixpkgs";
@ -56,6 +58,7 @@
outputs =
{ self
, nixos-hardware
, sops
, ha-now-playing
, pamedia
@ -156,6 +159,9 @@
loki = defSystem "x86_64-linux" {
imports = [
(import ./machines/loki/configuration.nix { inherit self nixpkgs; })
nixos-hardware.nixosModules.common-cpu-amd
nixos-hardware.nixosModules.common-gpu-amd
nixos-hardware.nixosModules.common-pc-ssd
];
};

View file

@ -13,10 +13,10 @@
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" "apple-mfi-fastcharge" ];
boot.extraModulePackages = [
(with config.boot.kernelPackages; rtl88x2bu)
];
boot.kernelModules = [ "kvm-amd" "apple-mfi-fastcharge" "zenpower" ];
boot.extraModulePackages = [ ] ++
(with config.boot.kernelPackages; [ rtl88x2bu zenpower ]);
fileSystems."/" = {
device = "/dev/disk/by-uuid/42065c7e-d0aa-4de8-a913-014cf59d48ac";

View file

@ -45,16 +45,7 @@ in
enable = true;
};
hardware.opengl = {
enable = true;
driSupport = true;
extraPackages = with pkgs; [
rocm-opencl-icd
rocm-opencl-runtime
rocm-runtime
];
};
hardware.opengl.enable = true;
programs.fish.enable = true;
@ -65,6 +56,7 @@ in
file
ht-rust
jq
lm_sensors
nix-template
nvd
usbutils