try to make nvidia module toogleable
This commit is contained in:
parent
02b4a97957
commit
22af8932ee
@ -9,6 +9,8 @@
|
|||||||
../../modules/nix/virt.nix
|
../../modules/nix/virt.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
smayzy.nvidia.enable = true;
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
extraSpecialArgs = { inherit inputs; };
|
extraSpecialArgs = { inherit inputs; };
|
||||||
users = {
|
users = {
|
||||||
|
|||||||
@ -1,10 +1,21 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
inherit (lib) mkIf mkOption types;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
services.xserver.videoDrivers = [ "nvidia" ];
|
options.smayzy.nvidia.enable = mkOption {
|
||||||
hardware.nvidia = {
|
type = types.bool;
|
||||||
modesetting.enable = true;
|
default = false;
|
||||||
open = true;
|
description = "set to true if you want to use a nvidia GC";
|
||||||
nvidiaSettings = true;
|
};
|
||||||
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
|
||||||
|
config = mkIf config.smayzy.nvidia.enable {
|
||||||
|
services.xserver.videoDrivers = [ "nvidia" ];
|
||||||
|
hardware.nvidia = {
|
||||||
|
modesetting.enable = true;
|
||||||
|
open = true;
|
||||||
|
nvidiaSettings = true;
|
||||||
|
package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user