mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-05 17:27:50 +00:00
[Hardware/Nvidia] rework Nvidia driver selection with a more versatile "variant" option
This commit is contained in:
parent
8c76734e33
commit
1ab3401832
3 changed files with 13 additions and 4 deletions
|
|
@ -13,13 +13,23 @@ in {
|
|||
|
||||
options.aviallon.hardware.nvidia = {
|
||||
enable = mkEnableOption "enable Nvidia hardware config";
|
||||
useProprietary = mkEnableOption "nvidia proprietary drivers";
|
||||
useProprietary = mkEnableOption "nvidia proprietary drivers" // {
|
||||
default = (cfg.variant == "proprietary");
|
||||
};
|
||||
variant = mkOption {
|
||||
type = with types; enum [ "proprietary" "open" "nouveau" ];
|
||||
description = "What driver variant to use";
|
||||
default = "proprietary";
|
||||
example = "nouveau";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
hardware.opengl.driSupport32Bit = true;
|
||||
|
||||
aviallon.programs.nvtop.enable = true;
|
||||
|
||||
aviallon.hardware.nvidia.useProprietary = mkForce ( cfg.variant == "proprietary" );
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue