Major refactor to flake, abstract non-trivial packages into their own

files (such as firefox/spotify-qt+librespot), create utils for reusable
function library
This commit is contained in:
Martin Larsson 2025-05-11 18:19:19 +02:00
parent d5735692d2
commit c4d7f5d082
11 changed files with 379 additions and 331 deletions

View file

@ -1,7 +1,8 @@
{ pkgs, config, ... }:
{ pkgs, ... }:
{
imports = [
./hardware-configuration.nix
./common/nvidia.nix
];
boot = {
@ -9,30 +10,6 @@
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
kernelModules = [
"nvidia"
"nvidia_modeset"
"nvidia_uvm"
"nvidia_drm"
];
blacklistedKernelModules = [ "nouveau" ];
kernelParams = [
"nvidia-drm.modeset=1"
"nvidia-drm.fbdev=1"
];
};
hardware = {
nvidia = {
modesetting.enable = true;
package = config.boot.kernelPackages.nvidiaPackages.stable;
open = true;
powerManagement = {
enable = true;
finegrained = false;
};
nvidiaPersistenced = true;
};
};
networking.hostName = "walnut-nixos";
@ -47,15 +24,4 @@
];
};
};
environment.variables = {
GBM_BACKEND = "nvidia-drm";
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
WLR_NO_HARDWARE_CURSORS = "1";
WLR_RENDERER = "vulkan";
};
services = {
xserver.videoDrivers = [ "nvidia" ];
};
}