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;
|
nvidiaSettings = false;
|
||||||
modesetting.enable = true;
|
modesetting.enable = true;
|
||||||
open = false;
|
open = false;
|
||||||
|
prime = {
|
||||||
|
nvidiaBusId = "PCI:1:0:0";
|
||||||
|
amdgpuBusId = "PCI:15:0:0";
|
||||||
|
#sync.enable = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
services.xserver = {
|
services.xserver.videoDrivers = [
|
||||||
videoDrivers = [
|
"nvidia"
|
||||||
"nvidia"
|
"amdgpu"
|
||||||
"amdgpu"
|
];
|
||||||
];
|
|
||||||
};
|
|
||||||
services.gnome.gnome-keyring.enable = true;
|
services.gnome.gnome-keyring.enable = true;
|
||||||
|
|
||||||
programs.steam.enable = true;
|
programs.steam.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,13 @@ let
|
||||||
pkgs.gnugrep
|
pkgs.gnugrep
|
||||||
];
|
];
|
||||||
text = ''
|
text = ''
|
||||||
xrandr --output DP-0 --auto --mode 3440x1440 --rate 120 --primary --pos 0x0
|
xrandr --setprovideroutputsource \
|
||||||
xrandr --output "$(xrandr | grep -e 'HDMI.* connected.*'| awk '{ print$1 }')" --auto --mode 1920x1080 --rate 144 --set TearFree on --pos 3440x360
|
"$(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
|
xset -dpms
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
@ -34,13 +39,19 @@ in
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
config = lib.mkForce "";
|
config = lib.mkForce "";
|
||||||
|
|
||||||
displayManager.sessionCommands = lib.mkBefore ''
|
displayManager.setupCommands = lib.mkBefore ''
|
||||||
if ! [ -e "/etc/Xorg/ONE_MONITOR" ] ; then
|
if ! [ -e "/etc/Xorg/ONE_MONITOR" ] ; then
|
||||||
${lib.getExe cfg_monitors}
|
${lib.getExe cfg_monitors}
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
boot.kernelPatches = lib.singleton {
|
||||||
|
name = "fix_amd_mem_access";
|
||||||
|
patch = null;
|
||||||
|
extraStructuredConfig.HSA_AMD_SVM = lib.kernel.yes;
|
||||||
|
};
|
||||||
|
|
||||||
systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules = [
|
||||||
"L /etc/X11/xorg.conf.d/99-custom.conf - - - - /etc/Xorg/2_mon.conf"
|
"L /etc/X11/xorg.conf.d/99-custom.conf - - - - /etc/Xorg/2_mon.conf"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,11 +46,6 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
kernelPatches = lib.singleton {
|
|
||||||
name = "fix_amd_mem_access";
|
|
||||||
patch = null;
|
|
||||||
extraStructuredConfig.HSA_AMD_SVM = lib.kernel.yes;
|
|
||||||
};
|
|
||||||
zfs = {
|
zfs = {
|
||||||
package = pkgs.zfs_unstable;
|
package = pkgs.zfs_unstable;
|
||||||
devNodes = "/dev/disk/by-id/";
|
devNodes = "/dev/disk/by-id/";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue