add speed factor
This commit is contained in:
parent
c2271eac15
commit
fd0fcc2712
4 changed files with 25 additions and 4 deletions
|
@ -30,15 +30,12 @@
|
|||
package = pkgs.fprintd-thinkpad;
|
||||
};
|
||||
|
||||
hardware.nvidiaOptimus.disable = true;
|
||||
hardware.nvidia.prime.sync.enable = false;
|
||||
hardware.bumblebee.enable = false;
|
||||
|
||||
imports = [
|
||||
/etc/nixos/hardware-configuration.nix
|
||||
../../boot.nix
|
||||
../../common.nix
|
||||
../../gfx-intel.nix
|
||||
../../gfx-nvidia-optimus.nix
|
||||
../../zerotier.nix
|
||||
../../distributed-builds.nix
|
||||
../../virtualbox.nix
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
genpass
|
||||
gdb lldb
|
||||
wget git gnupg curl tmux htop atop pciutils powertop ripgrep-all fd dnsutils du-dust
|
||||
( pass.withExtensions (ext: [ ext.pass-otp ext.pass-import ext.pass-genphrase ext.pass-audit ext.pass-update ]))
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
sshKey = "/home/cyryl/.ssh/id_ed25519";
|
||||
system = "x86_64-linux";
|
||||
maxJobs = 2;
|
||||
speedFactor = 2;
|
||||
supportedFeatures = [ "kvm" ];
|
||||
mandatoryFeatures = [ ];
|
||||
}
|
||||
|
@ -20,6 +21,7 @@
|
|||
sshKey = "/home/cyryl/.ssh/id_ed25519";
|
||||
system = "x86_64-linux";
|
||||
maxJobs = 2;
|
||||
speedFactor = 1;
|
||||
supportedFeatures = [ ];
|
||||
mandatoryFeatures = [ ];
|
||||
}
|
||||
|
|
21
nixos/gfx-nvidia-optimus.nix
Normal file
21
nixos/gfx-nvidia-optimus.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{ config, pkgs, ... }:
|
||||
let
|
||||
nvidia-offload = pkgs.writeShellScriptBin "nvidia-offload" ''
|
||||
export __NV_PRIME_RENDER_OFFLOAD=1
|
||||
export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0
|
||||
export __GLX_VENDOR_LIBRARY_NAME=nvidia
|
||||
export __VK_LAYER_NV_optimus=NVIDIA_only
|
||||
exec -a "$0" "$@"
|
||||
'';
|
||||
in
|
||||
{
|
||||
environment.systemPackages = [ nvidia-offload ];
|
||||
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
hardware.nvidia.prime.offload.enable = true;
|
||||
hardware.nvidia.prime = {
|
||||
intelBusId = "PCI:0:2:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in a new issue