diff --git a/hosts/common/optional/gpu/intel.nix b/hosts/common/optional/gpu/intel.nix new file mode 100644 index 0000000..18d6709 --- /dev/null +++ b/hosts/common/optional/gpu/intel.nix @@ -0,0 +1,34 @@ +{ + lib, + pkgs, + ... +}: let + inherit (lib.attrsets) attrValues; +in { + # https://github.com/NixOS/nixos-hardware/blob/master/common/gpu/intel/default.nix + boot.initrd.kernelModules = [ "i915" ]; + + hardware.graphics = { + enable = true; + enable32Bit = true; + extraPackages = attrValues { + inherit (pkgs) + mesa + libdrm + libva + vaapiVdpau + libvdpau-va-gl + intel-vaapi-driver + intel-media-driver + ; + }; + extraPackages32 = attrValues { + inherit (pkgs.driversi686Linux) + mesa + libvdpau-va-gl + intel-vaapi-driver + intel-media-driver + ; + }; + }; +} diff --git a/hosts/del/configuration.nix b/hosts/del/configuration.nix index 8dcb5f7..3f16144 100644 --- a/hosts/del/configuration.nix +++ b/hosts/del/configuration.nix @@ -5,7 +5,6 @@ pkgs, ... }: let - inherit (lib.attrsets) attrValues; inherit (lib.meta) getExe getExe'; inherit (lib.modules) mkForce; @@ -36,25 +35,6 @@ in { # enable = true; # platform = "ipu6"; # }; - graphics = { - enable = true; - enable32Bit = true; - extraPackages = attrValues { - inherit (pkgs) - mesa - libdrm - libva - vaapiVdpau - libvdpau-va-gl - ; - }; - extraPackages32 = attrValues { - inherit (pkgs.driversi686Linux) - mesa - libvdpau-va-gl - ; - }; - }; }; services = { diff --git a/hosts/del/profile.nix b/hosts/del/profile.nix index f934913..b9f2cbb 100644 --- a/hosts/del/profile.nix +++ b/hosts/del/profile.nix @@ -8,6 +8,7 @@ in { imports = map (append ../common/optional) [ "adb.nix" "cpu/intel.nix" + "gpu/intel.nix" "mullvad-vpn.nix" "opentabletdriver.nix" "power-supply.nix" diff --git a/hosts/hape/configuration.nix b/hosts/hape/configuration.nix index a423bc8..1b6a3e1 100644 --- a/hosts/hape/configuration.nix +++ b/hosts/hape/configuration.nix @@ -1,37 +1,13 @@ { config, - lib, - pkgs, ... -}: let - inherit (lib.attrsets) attrValues; -in { +}: { services = { pcscd.enable = true; udisks2.enable = true; }; - hardware.graphics = { - enable = true; - enable32Bit = true; - extraPackages = attrValues { - inherit (pkgs) - mesa - libdrm - libva - vaapiVdpau - libvdpau-va-gl - ; - }; - extraPackages32 = attrValues { - inherit (pkgs.driversi686Linux) - mesa - libvdpau-va-gl - ; - }; - }; - services.journald = { extraConfig = '' SystemMaxUse=100M diff --git a/hosts/hape/profile.nix b/hosts/hape/profile.nix index cc03317..0f5af34 100644 --- a/hosts/hape/profile.nix +++ b/hosts/hape/profile.nix @@ -8,8 +8,8 @@ in { imports = map (append ../common/optional) [ "adb.nix" "asusd.nix" - "cpu/amd.nix" - "gpu/amd.nix" + "cpu/intel.nix" + "gpu/intel.nix" "mullvad-vpn.nix" "opentabletdriver.nix" "power-supply.nix" diff --git a/hosts/work/configuration.nix b/hosts/work/configuration.nix index d74dc29..de39911 100644 --- a/hosts/work/configuration.nix +++ b/hosts/work/configuration.nix @@ -1,12 +1,9 @@ { config, inputs, - lib, pkgs, ... }: let - inherit (lib.attrsets) attrValues; - inherit (config.poz.other.system) username; in { nix.settings = { @@ -32,33 +29,6 @@ in { extraGroups = [ "docker" ]; }; - hardware = { - sensor.iio.enable = true; - # ipu6 = { - # enable = true; - # platform = "ipu6"; - # }; - graphics = { - enable = true; - enable32Bit = true; - extraPackages = attrValues { - inherit (pkgs) - mesa - libdrm - libva - vaapiVdpau - libvdpau-va-gl - ; - }; - extraPackages32 = attrValues { - inherit (pkgs.driversi686Linux) - mesa - libvdpau-va-gl - ; - }; - }; - }; - services = { pcscd.enable = true; diff --git a/hosts/work/profile.nix b/hosts/work/profile.nix index c3cd317..c31394d 100644 --- a/hosts/work/profile.nix +++ b/hosts/work/profile.nix @@ -8,6 +8,7 @@ in { imports = map (append ../common/optional) [ "cpu/intel.nix" "displaylink.nix" + "gpu/intel.nix" "suspend.nix" "v4l2.nix" "wayland.nix"