perf(gui): switch to open source nvidia drivers

Also disable xserver as it is not needed for a wayland-only setup.
This commit is contained in:
514fpv 2024-01-03 11:10:04 +08:00
parent 5c441d115f
commit 2bbad75474
Signed by: koishi
SSH key fingerprint: SHA256:axz0uIzzY+5W19i7QOUuiw5LSqhKfCBKPf3L4xFRxLw

View file

@ -4,10 +4,14 @@
, ... }: with lib; let
cfg = config.faucet.gui;
in {
imports = [ ./plymouth.nix ];
imports = [
./plymouth.nix
./greetd.nix
];
options.faucet.gui = {
enable = mkEnableOption "various setup required for GUI and support software";
session = mkEnableOption "software required for a graphical session" // { default = true; };
type = mkOption {
type = with types; enum [ "intel" "amdgpu" "nvidia" "prime" ];
description = "type of graphics acceleration used";
@ -31,8 +35,6 @@ in {
services.xserver.videoDrivers =
optional ((cfg.type == "nvidia") || (cfg.type == "prime")) "nvidia" ++
optional (cfg.type == "amdgpu") "amdgpu";
# has to be enabled even when using wayland
services.xserver.enable = true;
# inhibits default display manager
services.xserver.displayManager.startx.enable = mkDefault true;
@ -49,7 +51,7 @@ in {
powerManagement.enable = false;
powerManagement.finegrained = false;
open = false;
open = true;
};
boot.initrd.kernelModules =