New Flake Style XPS fix

This commit is contained in:
Lennart J. Kurzweg (Nx2)
2025-05-27 12:12:36 +02:00
parent ce140cf4f2
commit 68cb4377b7
52 changed files with 220 additions and 245 deletions

View File

@@ -1,4 +1,4 @@
{ config, lib, user, host, pkgs, modulesPath, ... }:
{ config, pkgs, hyper, modulesPath, ... }:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
@@ -13,10 +13,10 @@
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems = if host != "NxACE" then {
fileSystems = if hyper.host != "NxACE" then {
"/" = { device = "/dev/disk/by-label/nixos"; fsType = "ext4"; };
"/boot" = { device = "/dev/disk/by-label/EFI"; fsType = "vfat"; };
"/home/${user}/shared" = { device = "/dev/disk/by-label/shared"; fsType = "ntfs"; options = [ "uid=1000" "gid=100" ]; };
"/home/${hyper.user}/shared" = { device = "/dev/disk/by-label/shared"; fsType = "ntfs"; options = [ "uid=1000" "gid=100" ]; };
} else {
"/" = { device = "/dev/disk/by-label/nixos"; fsType = "ext4"; };
"/boot" = { device = "/dev/disk/by-label/EFI"; fsType = "vfat"; };
@@ -29,23 +29,23 @@
{ device = "/dev/disk/by-label/swap"; }
];
networking.useDHCP = lib.mkDefault true;
networking.useDHCP = pkgs.lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
nixpkgs.hostPlatform = pkgs.lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = pkgs.lib.mkDefault config.hardware.enableRedistributableFirmware;
# from nixos-hardware
services.thermald.enable = lib.mkDefault true;
boot.extraModprobeConfig = if host == "NxXPS" then ''
services.thermald.enable = pkgs.lib.mkDefault true;
boot.extraModprobeConfig = if hyper.host == "NxXPS" then ''
options iwlwifi 11n_disable=8
'' else "";
boot.initrd.kernelModules = if host == "NxXPS" then [ "i915" ] else [];
boot.initrd.kernelModules = if hyper.host == "NxXPS" then [ "i915" ] else [];
environment.variables = if host == "NxXPS" then {
VDPAU_DRIVER = lib.mkIf config.hardware.graphics.enable (lib.mkDefault "va_gl");
environment.variables = if hyper.host == "NxXPS" then {
VDPAU_DRIVER = pkgs.lib.mkIf config.hardware.graphics.enable (pkgs.lib.mkDefault "va_gl");
} else {};
hardware.graphics.extraPackages = if host == "NxXPS" then with pkgs; [
hardware.graphics.extraPackages = if hyper.host == "NxXPS" then with pkgs; [
(if (lib.versionOlder (lib.versions.majorMinor lib.version) "25.05") then vaapiIntel else intel-vaapi-driver)
libvdpau-va-gl
intel-media-driver