Files
nix-config/modules/hardware/amd-gpu.nix
2025-03-09 18:52:25 +01:00

17 lines
541 B
Nix

{ lib, config, pkgs, inputs, pkgsVersion, ... }:
let cfg = config.custom.hardware.amd-gpu;
in {
options.custom.hardware.amd-gpu = {
enable = lib.mkEnableOption "Enables amd gpus";
};
config = lib.mkIf cfg.enable {
boot.initrd.kernelModules = [ "amdgpu" ];
services.xserver.videoDrivers = [ "amdgpu" ];
# controller (overclock, undervolt, fan curves)
environment.systemPackages = with pkgs; [ lact ];
systemd.packages = with pkgs; [ lact ];
systemd.services.lactd.wantedBy = [ "multi-user.target" ];
};
}