hosts/xps16: move ipu6 config to separate file, extend
This commit is contained in:
@@ -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";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
34
hosts/xps16/ipu6.nix
Normal file
34
hosts/xps16/ipu6.nix
Normal file
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user