feat: Add nixos-hardware support

On thinkrac, this enables
- acpi_call userland binary
- trackpoint hardware
- TLP power manager
- fstrim
- optimizations for kaby lake intel cpus

On nutty-noon, this enables
- fstrim
- rocm, amdvlk
This commit is contained in:
Charlotte 🦝 Delenk 2022-03-22 19:22:35 +01:00
parent 4179e8a4a6
commit ccd2257cd8
Signed by: darkkirb
GPG key ID: AB2BD8DAF2E37122
4 changed files with 25 additions and 2 deletions

View file

@ -1,4 +1,4 @@
{ config, pkgs, modulesPath, lib, ... }: {
{ config, pkgs, modulesPath, lib, nixos-hardware, ... }: {
networking.hostName = "nutty-noon";
networking.hostId = "e77e1829";
@ -9,6 +9,9 @@
./services/tpm2.nix
./services/hydra.nix
./server.nix
nixos-hardware.nixosModules.common-cpu-amd
nixos-hardware.nixosModules.common-gpu-amd
nixos-hardware.nixosModules.common-pc-ssd
];
hardware.cpu.amd.updateMicrocode = true;
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" "sr_mod" "k10temp" ];

View file

@ -1,4 +1,4 @@
{ config, pkgs, modulesPath, lib, ... }: {
{ config, pkgs, modulesPath, lib, nixos-hardware, ... }: {
networking.hostName = "thinkrac";
networking.hostId = "2bfaea87";
@ -7,6 +7,9 @@
./systemd-boot.nix
./desktop.nix
./services/tpm2.nix
nixos-hardware.nixosModules.lenovo-thinkpad-t470s
nixos-hardware.nixosModules.common-cpu-intel-kaby-lake
nixos-hardware.nixosModules.common-pc-ssd
];
hardware.cpu.intel.updateMicrocode = true;

View file

@ -421,6 +421,21 @@
"type": "github"
}
},
"nixos-hardware": {
"locked": {
"lastModified": 1647447644,
"narHash": "sha256-Di7ZCXjQKEys+jxgl8Mp7a8nowRSeAbzH8c9QNYkw2k=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "32f61571b486efc987baca553fb35df22532ba63",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixos-hardware",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1638109994,
@ -671,6 +686,7 @@
"hosts-list": "hosts-list",
"hydra": "hydra",
"nix-gaming": "nix-gaming",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_7",
"nixpkgs-hydra": "nixpkgs-hydra",
"nixpkgs-soundtouch": "nixpkgs-soundtouch",

View file

@ -23,6 +23,7 @@ rec {
hydra.inputs.nixpkgs.follows = "nixpkgs-hydra";
hosts-list.url = github:StevenBlack/hosts;
hosts-list.flake = false;
nixos-hardware.url = github:NixOS/nixos-hardware;
};
outputs = { self, nixpkgs, sops-nix, home-manager, chir-rs, nur, nix-gaming, polymc, ... } @ args: