Split shared host config into dedicated modules
- Add shared modules for boot, hardware, networking, input, and host defaults - Move host-specific TOML flags to new option namespaces - Update SSH and service defaults for the new layout
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkOption types;
|
||||
cfg = config.unexplrd.hardware.graphics.vaapi;
|
||||
in {
|
||||
options.unexplrd.hardware.graphics.vaapi = mkOption {
|
||||
type = types.nullOr (types.enum ["intel-media-driver" "nvidia"]);
|
||||
default = null;
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
(mkIf (cfg == "intel-media-driver") {
|
||||
hardware.graphics.extraPackages = with pkgs; [
|
||||
intel-compute-runtime
|
||||
intel-media-driver
|
||||
vpl-gpu-rt
|
||||
];
|
||||
})
|
||||
(mkIf (cfg == "nvidia") {
|
||||
hardware.graphics.extraPackages = with pkgs; [
|
||||
nvidia-vaapi-driver
|
||||
];
|
||||
})
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user