common amd & nvidia
This commit is contained in:
1 parent
d55656c07c
commit
a4e437baf1
7 files changed
+145
-74
No files matched your search
@@ -0,0 +1,32 @@
|
||||
{ lib
|
||||
, config
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
cfg = config.skyg.nixos.common.hardware.amdgpu;
|
||||
in
|
||||
{
|
||||
options.skyg.nixos.common.hardware.amdgpu = with lib; {
|
||||
enable = mkEnableOption "amdgpu";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||
services.xserver.videoDrivers = [ "amdgpu" ];
|
||||
hardware.graphics = {
|
||||
extraPackages = [ pkgs.amdvlk ];
|
||||
extraPackages32 = [ pkgs.driversi686Linux.amdvlk ];
|
||||
};
|
||||
environment.systemPackages = (with pkgs; [
|
||||
rocmPackages.rocm-smi
|
||||
rocmPackages.rpp
|
||||
rocmPackages.rocm-core
|
||||
rocmPackages.rocm-runtime
|
||||
rocmPackages.hipblas
|
||||
rocmPackages.llvm.clang
|
||||
amdgpu_top
|
||||
amdctl
|
||||
]);
|
||||
};
|
||||
}
|
||||
@@ -5,6 +5,8 @@
|
||||
./fancontrol.nix
|
||||
./sound.nix
|
||||
./laptop-power.nix
|
||||
./nvidia.nix
|
||||
./amdgpu.nix
|
||||
];
|
||||
# Firmware Updater
|
||||
services.fwupd.enable = true;
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
{ lib
|
||||
, config
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
cfg = config.skyg.nixos.common.hardware.nvidia;
|
||||
in
|
||||
{
|
||||
options.skyg.nixos.common.hardware.nvidia = with lib; {
|
||||
enable = mkEnableOption "nvidia";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
# Nvidia Settings
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
hardware.nvidia-container-toolkit.enable = true;
|
||||
virtualisation.docker.enableNvidia = true;
|
||||
hardware.graphics.enable32Bit = true;
|
||||
hardware.graphics.enable = true;
|
||||
hardware.nvidia = {
|
||||
# datacenter.enable = true;
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = false;
|
||||
powerManagement.finegrained = false;
|
||||
open = false;
|
||||
nvidiaSettings = true;
|
||||
# package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user