first building version of lpt2 as flake
This commit is contained in:
parent
31e80e7401
commit
b71f8ee636
44 changed files with 396 additions and 677 deletions
47
modules_bak/hardware/amd.nix
Normal file
47
modules_bak/hardware/amd.nix
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.my.hardware.amd;
|
||||
in {
|
||||
options.my.hardware.amd = {
|
||||
cpu = lib.mkEnableOption "amd cpu";
|
||||
gpu = lib.mkEnableOption "amd gpu";
|
||||
radeon = lib.mkEnableOption "amd legacy gpu"; # old hardware, dont judge
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf cfg.cpu {
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
hardware.cpu.amd.updateMicrocode = true;
|
||||
})
|
||||
|
||||
(lib.mkIf cfg.gpu {
|
||||
boot.kernelModules = ["amdgpu"];
|
||||
services.xserver.videoDrivers = ["amdgpu"];
|
||||
|
||||
hardware.opengl = {
|
||||
extraPackages = with pkgs; [
|
||||
amdvlk
|
||||
];
|
||||
extraPackages32 = with pkgs; [
|
||||
driversi686Linux.amdvlk
|
||||
];
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
nvtopPackages.amd
|
||||
];
|
||||
})
|
||||
|
||||
(lib.mkIf cfg.radeon {
|
||||
boot.kernelModules = ["radeon"];
|
||||
services.xserver.videoDrivers = ["radeon"];
|
||||
environment.systemPackages = with pkgs; [
|
||||
radeontop
|
||||
];
|
||||
})
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue