Base of Nix Configuration
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
{ lib, config, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.within.graphics.nvidia.prime;
|
||||
in
|
||||
{
|
||||
options.within.graphics.nvidia.prime = {
|
||||
enable = mkEnableOption "System nvidia prime service";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
services.xserver.videoDrivers = [
|
||||
"modesetting"
|
||||
"nvidia"
|
||||
];
|
||||
|
||||
hardware.powerManagement.finegrained = true;
|
||||
hardware.prime = {
|
||||
offload.enable = true;
|
||||
intelBusId = "PCI:0@0:2:0";
|
||||
nvidiaBusId = "PCI:1@0:0:0";
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user