Last active
July 13, 2025 07:44
-
-
Save p-alik/6ed132ffad59de8fcbc4fb10b54d745e to your computer and use it in GitHub Desktop.
NixOS config on Dell XPS 13 Plus 9320
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/nixos/configuration.nix | |
{ config, pkgs, ... }: | |
{ | |
imports = | |
[ | |
./hardware-configuration.nix | |
]; | |
boot.loader.systemd-boot.enable = true; | |
boot.loader.efi.canTouchEfiVariables = true; | |
networking.hostName = "ls03064"; # Define your hostname. | |
networking.networkmanager.enable = true; | |
# Set your time zone. | |
time.timeZone = "Europe/Berlin"; | |
# Select internationalisation properties. | |
i18n.defaultLocale = "en_US.UTF-8"; | |
i18n.extraLocaleSettings = { | |
LC_ADDRESS = "de_DE.UTF-8"; | |
LC_IDENTIFICATION = "de_DE.UTF-8"; | |
LC_MEASUREMENT = "de_DE.UTF-8"; | |
LC_MONETARY = "de_DE.UTF-8"; | |
LC_NAME = "de_DE.UTF-8"; | |
LC_NUMERIC = "de_DE.UTF-8"; | |
LC_PAPER = "de_DE.UTF-8"; | |
LC_TELEPHONE = "de_DE.UTF-8"; | |
LC_TIME = "de_DE.UTF-8"; | |
}; | |
# Enable the X11 windowing system. | |
services.xserver.enable = true; | |
# https://nixos.org/manual/nixos/stable/index.html#sec-x11--graphics-cards-intel | |
services.xserver.videoDrivers = [ "intel" ]; | |
services.xserver.deviceSection = '' | |
Option "DRI" "2" | |
Option "TearFree" "true" | |
''; | |
services.xserver.displayManager.gdm.enable = true; | |
services.xserver.desktopManager.gnome.enable = true; | |
# Configure keymap in X11 | |
services.xserver = { | |
layout = "de"; | |
xkbVariant = ""; | |
}; | |
console.keyMap = "de"; | |
services.printing.enable = true; | |
# Enable sound with pipewire. | |
sound.enable = true; | |
hardware.pulseaudio.enable = false; | |
security.rtkit.enable = true; | |
services.pipewire = { | |
enable = true; | |
alsa.enable = true; | |
alsa.support32Bit = true; | |
pulse.enable = true; | |
}; | |
# for sake of ipu6-camera-bins | |
nixpkgs.config.allowUnfree = true; | |
users.users.<USER> = { | |
isNormalUser = true; | |
description = ".."; | |
extraGroups = [ "networkmanager" "wheel" ]; | |
packages = with pkgs; [ | |
home-manager | |
# leave browsers here for sake of camera support | |
firefox | |
google-chrome | |
]; | |
}; | |
# List packages installed in system profile. To search, run: | |
# $ nix search wget | |
environment.systemPackages = with pkgs; [ | |
file | |
glxinfo | |
htop | |
inxi | |
lshw | |
openvpn | |
pciutils | |
# https://discourse.nixos.org/t/v4l2loopback-cannot-find-module/26301/5 | |
# obs-studio | |
v4l-utils | |
vim | |
]; | |
programs.vim.defaultEditor = true; | |
system.stateVersion = "23.11"; | |
} | |
# /etc/nixos/hardware-configuration.nix | |
{ config, lib, pkgs, modulesPath, ... }: | |
let | |
ivsc-firmware = with pkgs; | |
stdenv.mkDerivation rec { | |
pname = "ivsc-firmware"; | |
version = "main"; | |
src = pkgs.fetchFromGitHub { | |
owner = "intel"; | |
repo = "ivsc-firmware"; | |
rev = "10c214fea5560060d387fbd2fb8a1af329cb6232"; | |
sha256 = "sha256-kEoA0yeGXuuB+jlMIhNm+SBljH+Ru7zt3PzGb+EPBPw="; | |
}; | |
installPhase = '' | |
mkdir -p $out/lib/firmware/vsc/soc_a1_prod | |
cp firmware/ivsc_pkg_ovti01a0_0.bin $out/lib/firmware/vsc/soc_a1_prod/ivsc_pkg_ovti01a0_0_a1_prod.bin | |
cp firmware/ivsc_skucfg_ovti01a0_0_1.bin $out/lib/firmware/vsc/soc_a1_prod/ivsc_skucfg_ovti01a0_0_1_a1_prod.bin | |
cp firmware/ivsc_fw.bin $out/lib/firmware/vsc/soc_a1_prod/ivsc_fw_a1_prod.bin | |
''; | |
}; | |
in | |
{ | |
imports = | |
[ (modulesPath + "/installer/scan/not-detected.nix") | |
]; | |
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "usbhid" "sd_mod" "i915" ]; | |
boot.initrd.kernelModules = []; | |
boot.kernelModules = [ "kvm-intel" ]; | |
boot.extraModulePackages = []; | |
# https://discourse.nixos.org/t/i915-driver-has-bug-for-iris-xe-graphics/25006/10 | |
# resolved: i915 0000:00:02.0: [drm] Selective fetch area calculation failed in pipe A | |
boot.kernelParams = [ | |
"i915.enable_psr=0" | |
]; | |
fileSystems."/" = | |
{ device = "/dev/disk/by-uuid/5cfd71ea-6978-427b-9b10-75249bcc63ff"; | |
fsType = "ext4"; | |
}; | |
boot.initrd.luks.devices."luks-5f6a700d-cfdb-492c-b52d-d875e818631c".device = "/dev/disk/by-uuid/5f6a700d-cfdb-492c-b52d-d875e818631c"; | |
fileSystems."/boot" = | |
{ device = "/dev/disk/by-uuid/F642-A1B7"; | |
fsType = "vfat"; | |
}; | |
swapDevices = [ ]; | |
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking | |
# (the default) this is the recommended approach. When using systemd-networkd it's | |
# still possible to use this option, but it's recommended to use it in conjunction | |
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. | |
networking.useDHCP = lib.mkDefault true; | |
# networking.interfaces.enp0s13f0u1u4.useDHCP = lib.mkDefault true; | |
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true; | |
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; | |
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; | |
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; | |
# Tracking Issue: Intel MIPI/IPU6 webcam-support | |
# https://github.com/NixOS/nixpkgs/issues/225743#issuecomment-1849613797 | |
# Infrastructure Processing Unit | |
hardware.ipu6 = { | |
enable = true; | |
platform = "ipu6ep"; | |
}; | |
hardware.enableRedistributableFirmware = true; | |
hardware.firmware = [ | |
ivsc-firmware | |
]; | |
# environment.etc.camera.source = "${ipu6-camera-hal}/share/defaults/etc/camera"; | |
} |
Thank you for the update @CyberT3C, unfortunately you solution doesn't work for me. Like in the comment on the issue Tracking Issue: Intel MIPI/IPU6 webcam-support, I'm facing
[ 30.325907] ivsc_ace intel_vsc-5db76cf6-0a68-4ed6-9b78-0361635e2447: switch camera to host failed: -110
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@AdrienLemaire Hey what hardware do you use. I just finished my working camera setup (Dell xps 9315). I looked at the comments and your sensor, message output, looked very similiar to me. I have the same camera sensor so I bet my setup would work for you.
I uploaded my files here: https://github.com/CyberT3C/nixos-config
I commented the debug steps which gave me new information in: https://github.com/CyberT3C/nixos-config/blob/main/dell-xps-9315-cam.nix
Look at the end.
OVTI01A0 in general
nixos
Unfurtunately there is no documentation in the nixos wiki for pipewire and the camera but the correct plugin for libcamera is already included in the nixos package. All you need is to activate it.
Webbrowser support: Last but not least enable pipewire in your favorit browser and don't forget about XDG.
TLDR: Use the nixos unstable channel with Linux Kerne 6.15.4 and import my config.