-
-
Save KarlJoad/b5412beed877a1cac04aa28870db8f82 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Do not modify this file! It was generated by ‘nixos-generate-config’ | |
# and may be overwritten by future invocations. Please make changes | |
# to /etc/nixos/configuration.nix instead. | |
{ config, lib, pkgs, ... }: | |
{ | |
imports = | |
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix> | |
]; | |
boot = { | |
loader = { | |
systemd-boot = { | |
enable = true; | |
configurationLimit = 20; # Only keep the last 20 generations. | |
consoleMode = "keep"; | |
editor = false; | |
memtest86.enable = true; | |
}; | |
}; | |
initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" "sr_mod" ]; | |
initrd.kernelModules = [ ]; | |
kernelModules = [ "kvm-intel" ]; | |
extraModulePackages = [ ]; | |
}; | |
fileSystems."/" = | |
{ device = "/dev/disk/by-uuid/e9cfae6e-91e4-47dc-a018-4b111f13d8f3"; | |
fsType = "ext4"; | |
}; | |
fileSystems."/boot" = | |
{ device = "/dev/disk/by-uuid/B92A-E549"; | |
fsType = "vfat"; | |
}; | |
swapDevices = | |
[ { device = "/dev/disk/by-uuid/fae28b9f-66b7-48f3-9217-1b3275894290"; } | |
]; | |
networking = { | |
hostName = "Karl-Desktop"; | |
networkmanager.enable = true; | |
# Interface-wide useDHCP will be deprecated, so per-interface useDHCP is used. | |
useDHCP = false; | |
interfaces = { | |
enp0s31f6.useDHCP = true; | |
}; | |
}; | |
services.xserver = { | |
enable = true; | |
videoDrivers = [ "nvidia" ]; # "nouveau" "nvidiaLegacy390" "intel" ]; | |
# modules = [ pkgs.linuxPackages.nvidia_x11 ]; | |
config = lib.mkForce '' | |
# nvidia-settings: X configuration file generated by nvidia-settings | |
# nvidia-settings: version 455.38 | |
Section "ServerLayout" | |
Identifier "Layout0" | |
Screen 0 "Screen0" 0 0 | |
Screen 1 "Screen1" RightOf "Screen0" | |
InputDevice "Keyboard0" "CoreKeyboard" | |
InputDevice "Mouse0" "CorePointer" | |
Option "Xinerama" "1" | |
EndSection | |
Section "Files" | |
FontPath "${pkgs.xorg.fontbhlucidatypewriter100dpi}/lib/X11/fonts/100dpi" | |
ModulePath "/nix/store/myw0y3pr2848xkfhpzdz5ck5ahh2d6xc-nvidia-x11-455.38-5.4.85-bin/lib/xorg/modules/drivers/nvidia_drv.so" | |
EndSection | |
Section "InputDevice" | |
# generated from default | |
Identifier "Mouse0" | |
Driver "mouse" | |
Option "Protocol" "auto" | |
Option "Device" "/dev/input/mice" | |
Option "Emulate3Buttons" "no" | |
Option "ZAxisMapping" "4 5" | |
EndSection | |
Section "InputDevice" | |
# generated from default | |
Identifier "Keyboard0" | |
Driver "kbd" | |
EndSection | |
Section "Monitor" | |
# HorizSync source: edid, VertRefresh source: edid | |
Identifier "Monitor0" | |
VendorName "Unknown" | |
ModelName "LG Electronics MP59HT" | |
HorizSync 30.0 - 85.0 | |
VertRefresh 40.0 - 75.0 | |
Option "DPMS" | |
EndSection | |
Section "Monitor" | |
# HorizSync source: edid, VertRefresh source: edid | |
Identifier "Monitor1" | |
VendorName "Unknown" | |
ModelName "HP x20LED" | |
HorizSync 24.0 - 83.0 | |
VertRefresh 50.0 - 76.0 | |
Option "DPMS" | |
EndSection | |
Section "Device" | |
Identifier "Device0" | |
Driver "nvidia" | |
VendorName "NVIDIA Corporation" | |
BoardName "GeForce GTX 1080" | |
BusID "PCI:1:0:0" | |
EndSection | |
Section "Device" | |
Identifier "Device1" | |
Driver "nvidia" | |
VendorName "NVIDIA Corporation" | |
BoardName "GeForce GTX 980 Ti" | |
BusID "PCI:2:0:0" | |
EndSection | |
Section "Screen" | |
Identifier "Screen0" | |
Device "Device0" | |
Monitor "Monitor0" | |
DefaultDepth 24 | |
Option "Stereo" "0" | |
Option "nvidiaXineramaInfoOrder" "DFP-1" | |
Option "metamodes" "nvidia-auto-select +0+0" | |
Option "SLI" "Off" | |
Option "MultiGPU" "Off" | |
Option "BaseMosaic" "off" | |
SubSection "Display" | |
Depth 24 | |
EndSubSection | |
EndSection | |
Section "Screen" | |
Identifier "Screen1" | |
Device "Device1" | |
Monitor "Monitor1" | |
DefaultDepth 24 | |
Option "Stereo" "0" | |
Option "metamodes" "nvidia-auto-select +0+0 {AllowGSYNC=Off}" | |
Option "SLI" "Off" | |
Option "MultiGPU" "Off" | |
Option "BaseMosaic" "off" | |
SubSection "Display" | |
Depth 24 | |
EndSubSection | |
EndSection | |
''; | |
exportConfiguration = true; # Show xserver settings in xorg.conf file in /etc/X11/ | |
}; | |
hardware = { | |
opengl.enable = true; # Enable OpenGL. | |
# Update microcode. Address "Firmware Bug" startup messages. | |
cpu.intel.updateMicrocode = true; | |
}; | |
nix.maxJobs = lib.mkDefault 8; | |
powerManagement.cpuFreqGovernor = lib.mkDefault "performance"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment