add nvidia and prime to citadel
This commit is contained in:
parent
cdc75090ff
commit
d224d55c1a
|
@ -71,10 +71,12 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [ {
|
swapDevices = [
|
||||||
device = "/.swapvol/swapfile";
|
{
|
||||||
size = 32*1024;
|
device = "/.swapvol/swapfile";
|
||||||
} ];
|
size = 32 * 1024;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
libinput.touchpad.accelSpeed = "0.5";
|
libinput.touchpad.accelSpeed = "0.5";
|
||||||
|
@ -82,14 +84,14 @@ in {
|
||||||
xkb.options = "caps:swapescape";
|
xkb.options = "caps:swapescape";
|
||||||
dpi = 196;
|
dpi = 196;
|
||||||
upscaleDefaultCursor = true;
|
upscaleDefaultCursor = true;
|
||||||
# FIXME this doesnt work for some reason
|
# FIXME this doesnt work for some reason
|
||||||
# displayManager.sessionCommands = pkgs.writeShellScriptBin "key-remaps" ''
|
# displayManager.sessionCommands = pkgs.writeShellScriptBin "key-remaps" ''
|
||||||
# ${pkgs.xorg.xmodmap}/bin/xmodmap -e "keycode 64 = Mode_switch"
|
# ${pkgs.xorg.xmodmap}/bin/xmodmap -e "keycode 64 = Mode_switch"
|
||||||
# ${pkgs.xorg.xmodmap}/bin/xmodmap -e "keycode 43 = h H Left H"
|
# ${pkgs.xorg.xmodmap}/bin/xmodmap -e "keycode 43 = h H Left H"
|
||||||
# ${pkgs.xorg.xmodmap}/bin/xmodmap -e "keycode 44 = j J Down J"
|
# ${pkgs.xorg.xmodmap}/bin/xmodmap -e "keycode 44 = j J Down J"
|
||||||
# ${pkgs.xorg.xmodmap}/bin/xmodmap -e "keycode 45 = k K Up K"
|
# ${pkgs.xorg.xmodmap}/bin/xmodmap -e "keycode 45 = k K Up K"
|
||||||
# ${pkgs.xorg.xmodmap}/bin/xmodmap -e "keycode 46 = l L Right L"
|
# ${pkgs.xorg.xmodmap}/bin/xmodmap -e "keycode 46 = l L Right L"
|
||||||
# '';
|
# '';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -123,6 +125,41 @@ in {
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# nvidia
|
||||||
|
hardware.opengl = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.xserver.videoDrivers = ["nvidia"];
|
||||||
|
|
||||||
|
hardware.nvidia = {
|
||||||
|
prime = {
|
||||||
|
offload = {
|
||||||
|
enable = true;
|
||||||
|
enableOffloadCmd = true;
|
||||||
|
};
|
||||||
|
intelBusId = "PCI:0:2:0";
|
||||||
|
nvidiaBusId = "PCI:1:0:0";
|
||||||
|
};
|
||||||
|
modesetting.enable = true;
|
||||||
|
powerManagement.enable = false;
|
||||||
|
powerManagement.finegrained = false;
|
||||||
|
open = false;
|
||||||
|
nvidiaSettings = true;
|
||||||
|
# FIXME issue with stable nvidia driver and latest linux kernel
|
||||||
|
# use mkDriver to specify newer nvidia driver that is compatible
|
||||||
|
# see: https://github.com/NixOS/nixpkgs/issues/341844#issuecomment-2351075413
|
||||||
|
# and https://discourse.nixos.org/t/builder-for-nvidia-x11-550-78-6-10-drv-failed-with-exit-code-2/49360/32
|
||||||
|
package = config.boot.kernelPackages.nvidiaPackages.mkDriver {
|
||||||
|
version = "555.58.02";
|
||||||
|
sha256_64bit = "sha256-xctt4TPRlOJ6r5S54h5W6PT6/3Zy2R4ASNFPu8TSHKM=";
|
||||||
|
sha256_aarch64 = "sha256-wb20isMrRg8PeQBU96lWJzBMkjfySAUaqt4EgZnhyF8=";
|
||||||
|
openSha256 = "sha256-8hyRiGB+m2hL3c9MDA/Pon+Xl6E788MZ50WrrAGUVuY=";
|
||||||
|
settingsSha256 = "sha256-ZpuVZybW6CFN/gz9rx+UJvQ715FZnAOYfHn5jt5Z2C8=";
|
||||||
|
persistencedSha256 = "sha256-a1D7ZZmcKFWfPjjH1REqPM5j/YLWKnbkP9qfRyIyxAw=";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "citadel";
|
hostName = "citadel";
|
||||||
networkmanager.enable = true;
|
networkmanager.enable = true;
|
||||||
|
|
Loading…
Reference in New Issue