feat: start moving graphics/

This commit is contained in:
Giulio De Pasquale 2025-04-26 16:38:04 +01:00
parent 8808298c29
commit 9a0b8d3917
3 changed files with 27 additions and 5 deletions

View File

@ -125,11 +125,6 @@ in
'';
};
hardware.opengl = {
enable = true;
extraPackages = with pkgs; [ vaapiVdpau ];
};
services = {
fwupd.enable = true;
das_watchdog.enable = true;
@ -156,6 +151,11 @@ in
enable = true;
path = "/media";
};
graphics = {
enable = true;
nvidia = true;
};
};
services = {

View File

@ -1,5 +1,6 @@
{...}: {
imports = [
./media.nix
./graphics.nix
];
}

21
modules/core/graphics.nix Normal file
View File

@ -0,0 +1,21 @@
{ config, lib, pkgs, ... }:
let
inherit (lib) mkIf;
cfg = config.pepe.core.graphics;
in
{
options.pepe.core.graphics = with lib; {
enable = mkEnableOption "Enable graphics";
nvidia = mkEnableOption "Enable nvidia graphics";
};
config = mkIf cfg.enable {
hardware.opengl = {
enable = true;
extraPackages = with pkgs; mkIf cfg.nvidia [ vaapiVdpau ];
};
};
}