mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 04:39:23 +08:00
devices.pc: switch to nvidia
This commit is contained in:
@@ -57,11 +57,12 @@ inputs:
|
||||
kernel = { varient = "cachyos"; patches = [ "cjktty" "hibernate-progress" ]; };
|
||||
networking.hostname = "pc";
|
||||
sysctl.laptop-mode = 5;
|
||||
gui.defaultX11 = true;
|
||||
};
|
||||
hardware =
|
||||
{
|
||||
cpus = [ "amd" ];
|
||||
gpu = { type = "amd+nvidia"; prime.busId = { amd = "8:0:0"; nvidia = "1:0:0"; }; dynamicBoost = true; };
|
||||
gpu = { type = "nvidia"; dynamicBoost = true; };
|
||||
legion = {};
|
||||
};
|
||||
packages.packageSet = "workstation";
|
||||
@@ -117,7 +118,7 @@ inputs:
|
||||
publicKey = "l1gFSDCeBxyf/BipXNvoEvVvLqPgdil84nmr5q6+EEw=";
|
||||
wireguardIp = "192.168.83.3";
|
||||
};
|
||||
gamemode = { enable = true; drmDevice = 1; };
|
||||
gamemode = { enable = true; drmDevice = 0; };
|
||||
slurm = { enable = true; cpu = { cores = 16; threads = 2; }; memoryMB = 90112; gpus."4060" = 1; };
|
||||
xrdp =
|
||||
{
|
||||
@@ -132,14 +133,16 @@ inputs:
|
||||
virtualisation.virtualbox.host = { enable = true; enableExtensionPack = true; };
|
||||
specialisation =
|
||||
{
|
||||
nvidia.configuration =
|
||||
hybrid-offload.configuration =
|
||||
{
|
||||
nixos =
|
||||
{
|
||||
hardware.gpu.type = inputs.lib.mkForce "nvidia";
|
||||
services.gamemode.drmDevice = inputs.lib.mkForce 0;
|
||||
hardware.gpu =
|
||||
{ type = inputs.lib.mkForce "amd+nvidia"; prime.busId = { amd = "8:0:0"; nvidia = "1:0:0"; }; };
|
||||
services.gamemode.drmDevice = inputs.lib.mkForce 1;
|
||||
system.gui.defaultX11 = inputs.lib.mkForce false;
|
||||
};
|
||||
system.nixos.tags = [ "nvidia" ];
|
||||
system.nixos.tags = [ "hybrid-offload" ];
|
||||
};
|
||||
hybrid-sync.configuration =
|
||||
{
|
||||
|
||||
@@ -6,6 +6,7 @@ inputs:
|
||||
{ type = types.bool; default = builtins.elem "desktop" inputs.config.nixos.packages._packageSets; };
|
||||
preferred = mkOption { type = types.bool; default = inputs.config.nixos.system.gui.enable; };
|
||||
autoStart = mkOption { type = types.bool; default = inputs.config.nixos.system.gui.preferred; };
|
||||
defaultX11 = mkOption { type = types.bool; default = false; };
|
||||
};
|
||||
config =
|
||||
let
|
||||
@@ -20,7 +21,7 @@ inputs:
|
||||
displayManager =
|
||||
{
|
||||
sddm.enable = true;
|
||||
defaultSession = "plasmawayland";
|
||||
defaultSession = if gui.defaultX11 then "plasma" else "plasmawayland";
|
||||
};
|
||||
desktopManager.plasma5.enable = true;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user