mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
Make vm stuff better
This commit is contained in:
parent
445fe9aa37
commit
cc12240ed8
3 changed files with 24 additions and 14 deletions
|
|
@ -31,13 +31,17 @@
|
|||
nvidiaSettings = false;
|
||||
modesetting.enable = true;
|
||||
open = false;
|
||||
prime = {
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
amdgpuBusId = "PCI:15:0:0";
|
||||
#sync.enable = true;
|
||||
};
|
||||
services.xserver = {
|
||||
videoDrivers = [
|
||||
};
|
||||
services.xserver.videoDrivers = [
|
||||
"nvidia"
|
||||
"amdgpu"
|
||||
];
|
||||
};
|
||||
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
|
||||
programs.steam.enable = true;
|
||||
|
|
|
|||
|
|
@ -19,8 +19,13 @@ let
|
|||
pkgs.gnugrep
|
||||
];
|
||||
text = ''
|
||||
xrandr --output DP-0 --auto --mode 3440x1440 --rate 120 --primary --pos 0x0
|
||||
xrandr --output "$(xrandr | grep -e 'HDMI.* connected.*'| awk '{ print$1 }')" --auto --mode 1920x1080 --rate 144 --set TearFree on --pos 3440x360
|
||||
xrandr --setprovideroutputsource \
|
||||
"$(xrandr --listproviders | grep -i AMD | sed -n 's/^.*name://p')" NVIDIA-0 \
|
||||
--output DP-0 \
|
||||
--mode 3440x1440 --rate 120 --primary --pos 0x0 \
|
||||
--output "$(xrandr | grep -e 'HDMI.* connected.*'| awk '{ print$1 }')" \
|
||||
--mode 1920x1080 --rate 144 --set TearFree on --pos 3440x360
|
||||
|
||||
xset -dpms
|
||||
'';
|
||||
};
|
||||
|
|
@ -34,13 +39,19 @@ in
|
|||
services.xserver = {
|
||||
config = lib.mkForce "";
|
||||
|
||||
displayManager.sessionCommands = lib.mkBefore ''
|
||||
displayManager.setupCommands = lib.mkBefore ''
|
||||
if ! [ -e "/etc/Xorg/ONE_MONITOR" ] ; then
|
||||
${lib.getExe cfg_monitors}
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
boot.kernelPatches = lib.singleton {
|
||||
name = "fix_amd_mem_access";
|
||||
patch = null;
|
||||
extraStructuredConfig.HSA_AMD_SVM = lib.kernel.yes;
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"L /etc/X11/xorg.conf.d/99-custom.conf - - - - /etc/Xorg/2_mon.conf"
|
||||
|
||||
|
|
|
|||
|
|
@ -46,11 +46,6 @@
|
|||
};
|
||||
|
||||
boot = {
|
||||
kernelPatches = lib.singleton {
|
||||
name = "fix_amd_mem_access";
|
||||
patch = null;
|
||||
extraStructuredConfig.HSA_AMD_SVM = lib.kernel.yes;
|
||||
};
|
||||
zfs = {
|
||||
package = pkgs.zfs_unstable;
|
||||
devNodes = "/dev/disk/by-id/";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue