Compare commits

..

No commits in common. "8283068de3aff3b3e8af5735adb3dc2dabc6ed5e" and "450d5a7ac8e84595040e879b7ad099c8255b363f" have entirely different histories.

3 changed files with 28 additions and 32 deletions

View file

@ -9,7 +9,7 @@
./modules/audio.nix
./modules/font.nix
./modules/nix-settings.nix
./modules/graphics.nix
./modules/nvidia.nix
./modules/services.nix
./modules/vim.nix
./modules/xconfig.nix

View file

@ -1,31 +0,0 @@
{ lib, config, ... }:
with lib;
let cfg = config.voidcruiser.graphics;
in {
options.voidcruiser.graphics ={
defaultSettings.enable = mkEnableOption "Enables some basic graphical settings";
nvidia = {
enable = mkEnableOption "Enables Nvidia settings";
proprietaryDrivers = mkEnableOption "Enables proprietary drivers";
};
};
config = {
hardware = {
opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
nvidia = mkIf cfg.nvidia.enable {
package = config.boot.kernelPackages.nvidiaPackages.stable;
powerManagement = {
enable = false;
finegrained = false;
};
open = !cfg.nvidia.proprietaryDrivers;
nvidiaSettings = cfg.nvidia.proprietaryDrivers;
};
};
services.xserver.videoDrivers = mkIf cfg.nvidia.proprietaryDrivers ["nvidia"];
};
}

27
modules/nvidia.nix Normal file
View file

@ -0,0 +1,27 @@
{ lib, config, ... }:
with lib;
let cfg = config.voidcruiser.nvidia;
in {
options.voidcruiser.nvidia = {
enable = mkEnableOption "Enables proprietary Nvidia drivers and related config";
};
config = mkIf cfg.enable {
hardware = {
opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
nvidia = {
package = config.boot.kernelPackages.nvidiaPackages.stable;
powerManagement = {
enable = false;
finegrained = false;
};
open = false;
nvidiaSettings = true;
};
};
services.xserver.videoDrivers = ["nvidia"];
};
}