fix some things

Signed-off-by: unexplrd <unexplrd@linerds.us>
This commit is contained in:
2025-05-04 19:04:19 +03:00
parent 03bcc94645
commit 9510cc48e2
5 changed files with 20 additions and 23 deletions

View File

@ -6,7 +6,6 @@
...
}: let
inherit (lib) mkDefault mkEnableOption mkIf;
inherit (config.networking) hostName;
cfg = config.module.config;
in {
imports = [
@ -25,33 +24,27 @@ in {
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";
type = lib.types.nullOr (lib.types.enum ["intel-media-driver"]);
default = null;
};
};
};
config =
mkIf (cfg.vaapi
== "intel-media-driver") {
config = lib.mkMerge [
(mkIf cfg.tpmDiskUnlock {
boot.initrd.systemd.tpm2.enable = mkDefault true;
})
(mkIf cfg.useIwd {
networking = {
networkmanager.wifi.backend = "iwd";
wireless.iwd.enable = true;
};
})
(mkIf (cfg.vaapi == "intel-media-driver") {
hardware.graphics.extraPackages = with pkgs; [
intel-compute-runtime
intel-media-driver
vpl-gpu-rt
];
}
// mkIf cfg.tpmDiskUnlock {
initrd.systemd.tpm2.enable = mkDefault true;
}
// mkIf cfg.useIwd {
networking = {
networkmanager.wifi.backend = "iwd";
wireless.iwd.enable = true;
};
}
// {
boot.loader.systemd-boot.enable =
if cfg.secureBoot
then false
else true;
};
})
];
}

View File

@ -8,7 +8,7 @@
scanRandMacAddress = true;
};
};
wireless.iwd.settings = {
wireless.iwd = {
settings = {
General.AddressRandomization = "network";
Settings.AlwaysRandomizeAddress = true;