Massive refactoring in configurable modules

This commit is contained in:
Antoine Viallon 2022-01-21 20:04:40 +01:00
commit 4319f5a3cc
Signed by: aviallon
GPG key ID: 186FC35EDEB25716
14 changed files with 603 additions and 0 deletions

22
hardware.nix Normal file
View file

@ -0,0 +1,22 @@
{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.aviallon.hardware;
desktopCfg = config.aviallon.desktop;
in
{
options.aviallon.hardware = {
gpuVendor = mkOption {
default = null;
example = "amd";
description = "Enable GPU vendor specific options";
type = types.enum [ "amd" "nvidia" "intel" ];
};
};
# imports = [
# (if (cfg.gpuVendor == "amd") then ./hardware/amd.nix else "")
# (if (cfg.gpuVendor == "nvidia") then ./hardware/nvidia.nix else "")
# (if (cfg.gpuVendor == "intel") then ./hardware/intel.nix else "")
# ];
}