treewide: hosts/solaire/config/nvidia -> core/hardware/nvidia

This commit is contained in:
Anthony Rodriguez 2025-01-28 19:51:01 +01:00
parent 00b3302880
commit a28174f516
Signed by: nezia
SSH key fingerprint: SHA256:Ihfpl0rUpqDevYqnzSR34OYfVLbDNkBiUjs3CpX4ykA
4 changed files with 26 additions and 15 deletions

View file

@ -1,14 +0,0 @@
{config, ...}: {
hardware.graphics.enable = true;
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia = {
open = false;
modesetting.enable = true;
powerManagement.enable = true;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.beta;
};
# https://wiki.hyprland.org/Nvidia/#suspendwakeup-issues
boot.kernelParams = ["nvidia.NVreg_PreserveVideoMemoryAllocations=1"];
}

View file

@ -1,5 +1,5 @@
_: { _: {
imports = [./hardware-configuration.nix ./config/theme.nix ./config/nvidia.nix]; imports = [./hardware-configuration.nix ./config/theme.nix];
local = { local = {
systemVars = { systemVars = {
@ -9,6 +9,7 @@ _: {
homeVars = { homeVars = {
fullName = "Anthony Rodriguez"; fullName = "Anthony Rodriguez";
email = "anthony@nezia.dev"; email = "anthony@nezia.dev";
signingKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEzs7SQH0Vjt9JHoXXmWy9fPU1I3rrRWV5magZFrI5al nezia@solaire";
}; };
profiles = { profiles = {
@ -18,6 +19,7 @@ _: {
modules = { modules = {
hyprland.enable = true; hyprland.enable = true;
nvidia.enable = true;
}; };
}; };

View file

@ -2,6 +2,7 @@
imports = [ imports = [
./fprintd.nix ./fprintd.nix
./fwupd.nix ./fwupd.nix
./nvidia.nix
./printing.nix ./printing.nix
./uni-sync.nix ./uni-sync.nix
./via.nix ./via.nix

View file

@ -0,0 +1,22 @@
{
lib,
config,
...
}: let
inherit (lib) mkIf;
in {
config = mkIf config.local.modules.nvidia.enable {
hardware.graphics.enable = true;
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia = {
open = false;
modesetting.enable = true;
powerManagement.enable = true;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.beta;
};
# https://wiki.hyprland.org/Nvidia/#suspendwakeup-issues
boot.kernelParams = ["nvidia.NVreg_PreserveVideoMemoryAllocations=1"];
};
}