Skip to content

Commit

Permalink
refac(gpu): move nvidia-specific settings to nvidia module
Browse files Browse the repository at this point in the history
  • Loading branch information
workflow committed Oct 15, 2024
1 parent ad5161e commit 405ac4a
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 14 deletions.
1 change: 0 additions & 1 deletion configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ in {
./system/desktop.nix
./system/dns.nix
./system/fonts.nix
./system/gpu.nix
./system/io
./system/ledgerlive.nix
./system/networking.nix
Expand Down
2 changes: 2 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
nixpkgs.nixosModules.notDetected
./machines/boar/hardware-scan.nix
./machines/boar/system.nix
./system/nvidia
./configuration.nix
home-manager.nixosModules.home-manager
{
Expand Down Expand Up @@ -99,6 +100,7 @@
nixpkgs.nixosModules.notDetected
./machines/flexbox/hardware-scan.nix
./machines/flexbox/system.nix
./system/nvidia
./configuration.nix
home-manager.nixosModules.home-manager
{
Expand Down
5 changes: 0 additions & 5 deletions home/picom.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@

enable = true;

# For NVIDIA, we can run with the simpler xrender backend,
# which does not do vsync
# Note: This may also need ForceFullCompositionPipeline in xorg.conf
# See: https://github.com/chjj/compton/issues/227
# backend = if isNvidia then "xrender" else "glx";
backend = "glx";

settings = {
Expand Down
3 changes: 0 additions & 3 deletions machines/boar/system.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@

powerManagement.cpuFreqGovernor = lib.mkDefault "performance";

# GPU
services.xserver.videoDrivers = ["nvidia"];

# LVM on LUKS
boot.initrd.luks.devices = {
root = {
Expand Down
1 change: 0 additions & 1 deletion machines/flexbox/system.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ in {

# GPU
environment.systemPackages = [nvidia-offload];
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia.prime = {
offload.enable = true;
intelBusId = "PCI:0:2:0";
Expand Down
3 changes: 0 additions & 3 deletions system/gpu.nix

This file was deleted.

7 changes: 7 additions & 0 deletions system/nvidia/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{pkgs, ...}: {
boot.blacklistedKernelModules = ["nouveau"];
environment.systemPackages = [
pkgs.nvtopPackages.full # nvtop
];
services.xserver.videoDrivers = ["nvidia"];
}
1 change: 0 additions & 1 deletion system/video/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
boot.kernelModules = ["v4l2loopback"];

environment.systemPackages = [
pkgs.nvtopPackages.full # nvtop
pkgs.v4l-utils # Video4Linux2 -> configuring webcam
];
}

0 comments on commit 405ac4a

Please sign in to comment.