modules/config: init new module

Signed-off-by: unexplrd <unexplrd@linerds.us>
This commit is contained in:
2025-05-04 16:58:22 +03:00
parent 6ae0a38f62
commit b55a50ada8
42 changed files with 220 additions and 280 deletions

View File

@ -0,0 +1,39 @@
{
config,
lib,
pkgs,
...
}: let
inherit (lib) mkDefault mkEnableOption mkIf;
cfg = config.module.config;
in {
imports = [
./boot
./hardware
./networking
./nix
./programs.nix
./services.nix
./users.nix
./sops.nix
];
options = {
module.config = {
tpmDiskUnlock = mkEnableOption "set if luks enrolled in tpm2";
secureBoot = mkEnableOption "set if secure boot is configured";
useIwd = mkEnableOption "set to use iwd instead of wpa-supplicant";
vaapi = lib.mkOption {
type = lib.types.enum ["intel-media-driver"];
default = "intel-media-driver";
};
};
};
config = mkIf (cfg.vaapi
== "intel-media-driver") {
hardware.graphics.extraPackages = with pkgs; [
intel-compute-runtime
intel-media-driver
vpl-gpu-rt
];
};
}