17 lines
541 B
Nix
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" ];
|
|
};
|
|
}
|