Probelm with making my nvidia gpu the primary gpu

Hello. While i was trying to make my nvidia gpu the primary gpu i found this command:

cp -p /usr/share/X11/xorg.conf.d/nvidia.conf /etc/X11/xorg.conf.d/nvidia.conf

But when i ran it i found out that the nvidia.conf file dosen’t exist in both locations
How can i fix this??

Do you even have the xorg server packages installed.

rpm -q xorg-x11-server-Xorg

nvidia X libs are only installed if Xorg is present.

$ rpm -qR xorg-x11-drv-nvidia |grep xorg-x11-server-Xorg
(xorg-x11-drv-nvidia-xorg-libs(x86-64) = 3:595.71.05-1.fc44 if xorg-x11-server-Xorg(x86-64))
$ rpm -ql xorg-x11-drv-nvidia-xorg-libs-595.71.05-1.fc44.x86_64
/etc/X11/xorg.conf.d/00-avoid-glamor.conf
/etc/X11/xorg.conf.d/99-nvidia.conf
/etc/X11/xorg.conf.d/nvidia.conf
/usr/lib64/xorg/modules/drivers/nvidia_drv.so
/usr/lib64/xorg/modules/extensions/libglxserver_nvidia.so
/usr/share/X11/xorg.conf.d/nvidia.conf

P.S You are wasting your time if you are using a wayland DE.

After installing xorg server packagges this is what happend:
The first command worked
The second command gave me:

zsh: $: command not found...
zsh: unknown file attribute: 8

The third command gave me:

zsh: $: command not found...
zsh: no such file or directory: /etc/X11/xorg.conf.d/00-avoid-glamor.conf
zsh: no such file or directory: /etc/X11/xorg.conf.d/99-nvidia.conf
zsh: no such file or directory: /etc/X11/xorg.conf.d/nvidia.conf
[1]    18817 segmentation fault (core dumped)  /usr/lib64/xorg/modules/drivers/nvidia_drv.so
[1]    18825 segmentation fault (core dumped)  /usr/lib64/xorg/modules/extensions/libglxserver_nvidia.so
zsh: permission denied: /usr/share/X11/xorg.conf.d/nvidia.conf

The $ is often used in unix docs to show its a shell command.
You are not expected to type the $, just remove it.
Of course there is no way to know this convention if you new to fedora/linux.