updating kaladin to use latest nvidia driver

This commit is contained in:
Chris Cochrun 2022-10-24 09:17:03 -05:00
parent 4b05726aa8
commit 37bb6ef1e2
3 changed files with 74 additions and 60 deletions

View file

@ -792,10 +792,10 @@ Kaladin is my desktop machine. A powerhouse for the most part with a recent i7 a
{ config, pkgs, ... }:
{
imports =
[
./hardware-configuration.nix
];
imports =
[
./hardware-configuration.nix
];
<<experimental-features>>
@ -832,7 +832,7 @@ imports =
i18n.defaultLocale = "en_US.UTF-8";
# Set default shell to be dash for speed
environment.binsh = "${pkgs.dash}/bin/dash";
# environment.binsh = "${pkgs.dash}/bin/dash";
# NVIDIA
services.xserver.videoDrivers = [ "nvidia" ];
@ -845,11 +845,18 @@ imports =
];
};
nvidia = {
package = config.boot.kernelPackages.nvidiaPackages.latest;
modesetting.enable = true;
powerManagement.enable = true;
};
};
services.xserver.screenSection = ''
Option "metamodes" "nvidia-auto-select +0+0 {ForceFullCompositionPipeline=On}"
Option "AllowIndirectGLXProtocol" "off"
Option "TripleBuffer" "on"
'';
<<desktop>>
# Configure keymap in X11
@ -912,25 +919,25 @@ imports =
<<base-packages>>
<<general-packages>>
blender
neofetch
# ethminer
lutris
protonup
nvtop
neofetch
# ethminer
lutris
protonup
nvtop
# Dev tools
<<dev-tools>>
<<lightlyshaders>>
];
nixpkgs.overlays = [
# nixpkgs.overlays = [
(import (builtins.fetchTarball {
url = https://github.com/nix-community/emacs-overlay/archive/master.tar.gz;
sha256 = "1v1n30a2ai5mnlkrkwv4mfczd3601sqxxlawadxariblfvg7qz4j";
}))
# (import (builtins.fetchTarball {
# url = https://github.com/nix-community/emacs-overlay/archive/master.tar.gz;
# sha256 = "1v1n30a2ai5mnlkrkwv4mfczd3601sqxxlawadxariblfvg7qz4j";
# }))
<<overlays>>
];
# <<overlays>>
# ];
<<emacs>>
<<samba>>
@ -993,7 +1000,7 @@ And here is it's hardware config.
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" "sr_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ config.boot.kernelPackages.nvidia_x11 ];
boot.extraModulePackages = [ config.boot.kernelPackages.nvidiaPackages.latest ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/9b5a1a62-0de6-4e07-a541-634736980d10";

View file

@ -1,10 +1,10 @@
{ config, pkgs, ... }:
{
imports =
[
./hardware-configuration.nix
];
imports =
[
./hardware-configuration.nix
];
nix = {
extraOptions = "experimental-features = nix-command flakes";
@ -59,7 +59,7 @@ imports =
i18n.defaultLocale = "en_US.UTF-8";
# Set default shell to be dash for speed
environment.binsh = "${pkgs.dash}/bin/dash";
# environment.binsh = "${pkgs.dash}/bin/dash";
# NVIDIA
services.xserver.videoDrivers = [ "nvidia" ];
@ -72,11 +72,18 @@ imports =
];
};
nvidia = {
package = config.boot.kernelPackages.nvidiaPackages.latest;
modesetting.enable = true;
powerManagement.enable = true;
};
};
services.xserver.screenSection = ''
Option "metamodes" "nvidia-auto-select +0+0 {ForceFullCompositionPipeline=On}"
Option "AllowIndirectGLXProtocol" "off"
Option "TripleBuffer" "on"
'';
boot.supportedFilesystems = [ "ntfs" ];
services.xserver = {
enable = true;
@ -329,11 +336,11 @@ imports =
# hyprland
blender
neofetch
# ethminer
lutris
protonup
nvtop
neofetch
# ethminer
lutris
protonup
nvtop
# Dev tools
android-tools
nix-index
@ -366,39 +373,39 @@ imports =
(with import <nixpkgs> {}; libsForQt5.callPackage ../../LightlyShaders {})
];
nixpkgs.overlays = [
# nixpkgs.overlays = [
(import (builtins.fetchTarball {
url = https://github.com/nix-community/emacs-overlay/archive/master.tar.gz;
sha256 = "1v1n30a2ai5mnlkrkwv4mfczd3601sqxxlawadxariblfvg7qz4j";
}))
# (import (builtins.fetchTarball {
# url = https://github.com/nix-community/emacs-overlay/archive/master.tar.gz;
# sha256 = "1v1n30a2ai5mnlkrkwv4mfczd3601sqxxlawadxariblfvg7qz4j";
# }))
(self: super:
{
myAwesome = super.awesome.overrideAttrs (old: rec {
pname = "myAwesome";
version = "git-20220614-3a54221";
src = super.fetchFromGitHub {
owner = "awesomeWM";
repo = "awesome";
rev = "3a542219f3bf129546ae79eb20e384ea28fa9798";
sha256 = "4z3w6iuv+Gw2xRvhv2AX4suO6dl82woJn0p1nkEx3uM=";
};
patches = [];
});
}
)
(self: super:
{
qt5ct = super.qt5ct.overrideAttrs (old: rec {
patches = (old.patches or []) ++ [
../../qt5ct.patch
];
});
}
)
];
# (self: super:
# {
# myAwesome = super.awesome.overrideAttrs (old: rec {
# pname = "myAwesome";
# version = "git-20220614-3a54221";
# src = super.fetchFromGitHub {
# owner = "awesomeWM";
# repo = "awesome";
# rev = "3a542219f3bf129546ae79eb20e384ea28fa9798";
# sha256 = "4z3w6iuv+Gw2xRvhv2AX4suO6dl82woJn0p1nkEx3uM=";
# };
# patches = [];
# });
# }
# )
#
# (self: super:
# {
# qt5ct = super.qt5ct.overrideAttrs (old: rec {
# patches = (old.patches or []) ++ [
# ../../qt5ct.patch
# ];
# });
# }
# )
# ];
services.emacs = {
enable = true;

View file

@ -8,7 +8,7 @@
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" "sr_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ config.boot.kernelPackages.nvidia_x11 ];
boot.extraModulePackages = [ config.boot.kernelPackages.nvidiaPackages.latest ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/9b5a1a62-0de6-4e07-a541-634736980d10";