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

@ -27,6 +27,7 @@
config = { config = {
secureBoot = true; secureBoot = true;
tpmDiskUnlock = true; tpmDiskUnlock = true;
vaapi = "intel-media-driver";
}; };
stylix = { stylix = {
enable = true; enable = true;

View File

@ -22,6 +22,7 @@
config = { config = {
secureBoot = true; secureBoot = true;
useIwd = true; useIwd = true;
vaapi = "intel-media-driver";
}; };
stylix = { stylix = {
enable = true; enable = true;

View File

@ -14,6 +14,7 @@
hostName = "sarien"; hostName = "sarien";
}; };
boot.loader.systemd-boot.enable = true;
environment.memoryAllocator.provider = "mimalloc"; environment.memoryAllocator.provider = "mimalloc";
system.stateVersion = "25.05"; system.stateVersion = "25.05";
time.timeZone = "Europe/Kyiv"; time.timeZone = "Europe/Kyiv";
@ -23,6 +24,7 @@
module = { module = {
config = { config = {
useIwd = true; useIwd = true;
vaapi = "intel-media-driver";
}; };
stylix = { stylix = {
enable = true; enable = true;

View File

@ -6,7 +6,6 @@
... ...
}: let }: let
inherit (lib) mkDefault mkEnableOption mkIf; inherit (lib) mkDefault mkEnableOption mkIf;
inherit (config.networking) hostName;
cfg = config.module.config; cfg = config.module.config;
in { in {
imports = [ imports = [
@ -25,33 +24,27 @@ in {
secureBoot = mkEnableOption "set if secure boot is configured"; secureBoot = mkEnableOption "set if secure boot is configured";
useIwd = mkEnableOption "set to use iwd instead of wpa-supplicant"; useIwd = mkEnableOption "set to use iwd instead of wpa-supplicant";
vaapi = lib.mkOption { vaapi = lib.mkOption {
type = lib.types.enum ["intel-media-driver"]; type = lib.types.nullOr (lib.types.enum ["intel-media-driver"]);
default = "intel-media-driver"; default = null;
}; };
}; };
}; };
config = config = lib.mkMerge [
mkIf (cfg.vaapi (mkIf cfg.tpmDiskUnlock {
== "intel-media-driver") { 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; [ hardware.graphics.extraPackages = with pkgs; [
intel-compute-runtime intel-compute-runtime
intel-media-driver intel-media-driver
vpl-gpu-rt 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; scanRandMacAddress = true;
}; };
}; };
wireless.iwd.settings = { wireless.iwd = {
settings = { settings = {
General.AddressRandomization = "network"; General.AddressRandomization = "network";
Settings.AlwaysRandomizeAddress = true; Settings.AlwaysRandomizeAddress = true;