From 7708de4a8ad41acd98ceee07de44cd724d1c7fa1 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Fri, 16 Jan 2026 23:58:35 +0900 Subject: [PATCH] hosts/xps16: move ipu6 config to separate file, extend --- hosts/xps16/configuration.nix | 5 +---- hosts/xps16/ipu6.nix | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 hosts/xps16/ipu6.nix diff --git a/hosts/xps16/configuration.nix b/hosts/xps16/configuration.nix index 15384bf..1780b8f 100644 --- a/hosts/xps16/configuration.nix +++ b/hosts/xps16/configuration.nix @@ -4,6 +4,7 @@ ./hardware-configuration.nix ./apparmor.nix + ./ipu6.nix ./services/btrfs.nix ./services/docker.nix @@ -98,9 +99,5 @@ enable = true; enable32Bit = true; }; - ipu6 = { - enable = true; - platform = "ipu6epmtl"; - }; }; } diff --git a/hosts/xps16/ipu6.nix b/hosts/xps16/ipu6.nix new file mode 100644 index 0000000..db3d45a --- /dev/null +++ b/hosts/xps16/ipu6.nix @@ -0,0 +1,34 @@ +{ config, pkgs, lib, ... }: +let + cfg = config.hardware.ipu6; +in +{ + hardware.ipu6 = { + enable = true; + platform = "ipu6epmtl"; + }; + + hardware.firmware = lib.optionals cfg.enable (with pkgs; [ + ipu6-camera-bins + ivsc-firmware + ]); + + services.udev.extraRules = lib.mkIf cfg.enable '' + SUBSYSTEM=="intel-ipu6-psys", MODE="0660", GROUP="video" + ''; + + boot.extraModulePackages = lib.optionals cfg.enable (with config.boot.kernelPackages; [ ipu6-drivers ]); + + environment.systemPackages = lib.optionals cfg.enable (with pkgs; [ + libcamera + ]); + + # https://jgrulich.cz/2024/08/19/making-pipewire-default-option-for-firefox-camera-handling/ + services.pipewire.wireplumber.extraConfig."disable-v4l2" = lib.mkIf cfg.enable { + "wireplumber.profiles" = { + "main" = {"monitor.v4l2" = "disabled";}; + }; + }; + + # See also: https://github.com/NixOS/nixpkgs/issues/225743 +}