惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
Docker
阮一峰的网络日志
阮一峰的网络日志
T
Tailwind CSS Blog
博客园 - 【当耐特】
量子位
博客园 - 叶小钗
有赞技术团队
有赞技术团队
Jina AI
Jina AI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - Franky
博客园 - 司徒正美
爱范儿
爱范儿
美团技术团队
小众软件
小众软件
酷 壳 – CoolShell
酷 壳 – CoolShell
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
V
V2EX
罗磊的独立博客
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Last Week in AI
Last Week in AI
Hugging Face - Blog
Hugging Face - Blog
I
InfoQ
D
DataBreaches.Net
宝玉的分享
宝玉的分享

ktz.

Faking disks to look real with QEMU and Proxmox Control a Mitsubishi mini-split with ESPHome and Home Assistant for $10 The Enshittification of Plex 💩 I read a book. Codex is changing how I think about computers Factorio: Controlling imports from Space Factorio: Controlling Space Ship collector filters via circuit logic Factorio: Recycler Belt Stacking Was Solar Worth It? AppArmor's Awkward Aftermath Atop Proxmox 9 Unprivileged LXCs are just a bit annoying My Terminal and Editor Theming Proxmox 9 broke my docker containers What if..? Self-Hosted 150. Fin.
How to enable Intel Quicksync on NixOS with a Supermicro ...
Alex Kretzschmar · 2025-02-23 · via ktz.
How to enable Intel Quicksync on NixOS with a Supermicro X13SAE-F and an Intel i5-13600k

Like most things, getting Quicksync working on NixOS with a motherboard that has IPMI and a 13th gen Intel chip is quite simple once you know how.

The complexities come from ensuring users are in the right groups, and you have the correct arrangement of packages in the hardware.opengl configuration.

nix-config/hosts/nixos/morphnix/default.nix at main · ironicbadger/nix-config

Contribute to ironicbadger/nix-config development by creating an account on GitHub.

ironicbadger

I'll include a minimal relevant NixOS configuration below, and you can cherry pick the bits you need to get it working. The full configuration is below as well.

# Firmware is essential for i915 driver
hardware.firmware = [ pkgs.linux-firmware ];

# Minimal OpenGL/QuickSync configuration
hardware.opengl = {
  enable = true;
  extraPackages = with pkgs; [
    intel-media-driver  # The core QuickSync driver
    intel-compute-runtime  # Required for hardware tonemapping
  ];
};

# Essential environment variable for iHD driver
environment.sessionVariables.LIBVA_DRIVER_NAME = "iHD";

# Essential user groups for hardware access
users.users.YOUR_USERNAME.extraGroups = [ "video" "render" ];

Full configuration.nix file

I've included the entire file here unedited just for posterity really. The living breathing version is in my nix-config repo.

quicksync configuration · ironicbadger/nix-config@a3c4fb4

Contribute to ironicbadger/nix-config development by creating an account on GitHub.

GitHubironicbadger

{ config, inputs, pkgs, name, ... }:
{
  imports = [
      ./hardware-configuration.nix
      (builtins.fetchTarball {
        url = "https://github.com/nix-community/nixos-vscode-server/tarball/master";
        sha256 = "09j4kvsxw1d5dvnhbsgih0icbrxqv90nzf0b589rb5z6gnzwjnqf";
      })
      ./../../common/nixos-common.nix
      ./../../common/common-packages.nix
    ];

  ## COLMENA
  deployment = {
    targetHost = name;
    targetUser = "root";
    buildOnTarget = true;
    allowLocalDeployment = true;
  };

  boot.loader.systemd-boot.enable = true;
  boot.loader.efi.canTouchEfiVariables = true;
  boot.kernelModules = [ "drivetemp" ];
  boot.kernel.sysctl."net.ipv4.ip_forward" = 1;
  boot.kernelParams = [
    "i915.fastboot=1"
    "i915.enable_guc=3"
  ];

  boot.supportedFilesystems = [ "zfs" ];
  boot.zfs.extraPools = [ "nvme-appdata" "ssd4tb" "bigrust18" ];
  services.zfs.autoScrub.enable = true;

  time.timeZone = "America/New_York";

  home-manager.useGlobalPkgs = true;
  home-manager.useUserPackages = true;
  home-manager.users.alex = { imports = [ ./../../../home/alex.nix ]; };
  users.users.alex = {
    isNormalUser = true;
    extraGroups = [ "wheel" "docker" "render" "video"];
    packages = with pkgs; [
      home-manager
    ];
  };
  users.defaultUserShell = pkgs.bash;
  programs.bash.interactiveShellInit = "echo \"\" \n figurine -f \"3d.flf\" morphnix";

  environment.systemPackages = with pkgs; [
    ansible
    bc
    devbox
    dig
    e2fsprogs # badblocks
    figurine
    git
    gptfdisk
    hddtemp
    htop
    intel-gpu-tools
    inxi
    iotop
    jq
    lm_sensors
    mc
    mergerfs
    molly-guard
    ncdu
    nmap
    nvme-cli
    powertop
    python3
    smartmontools
    snapraid
    tmux
    tree
    wget
    xfsprogs

    # zfs send/rec with sanoid/syncoid
    sanoid
    lzop
    mbuffer
    pv
    zstd
  ];

  ## quicksync
  hardware.firmware = [ pkgs.linux-firmware ];
  hardware.opengl = {
    enable = true;
    extraPackages = with pkgs; [
    # VA-API drivers
    intel-media-driver  # LIBVA_DRIVER_NAME=iHD
    intel-vaapi-driver
    libvdpau-va-gl

    # OpenCL and compute support
    intel-compute-runtime
    intel-gmmlib
    onevpl-intel-gpu

    # VA-API utilities and libraries
    libva
    libva-utils

    # Diagnostic tools
    glxinfo
    pciutils
    ];
  };
  environment.sessionVariables = {
    LIBVA_DRIVER_NAME = "iHD";
    LIBVA_DRIVERS_PATH = "/run/opengl-driver/lib/dri";
    LIBVA_MESSAGING_LEVEL = "1";
    GST_VAAPI_ALL_DRIVERS = "1";
  };

  networking = {
    firewall.enable = false;
    hostName = "morphnix";
    interfaces = {
      enp13s0 = {
        useDHCP = false;
        ipv4.addresses = [ {
          address = "10.42.1.10";
          prefixLength = 21;
        } ];
      };
    };
    defaultGateway = "10.42.0.254";
    nameservers = [ "10.42.0.253" ];
  localCommands = ''
    ip rule add to 10.42.0.0/21 priority 2500 lookup main || true
  '';
  };

  virtualisation = {
    docker = {
      enable = true;
      autoPrune = {
        enable = true;
        dates = "weekly";
      };
    };
  };

  services.fstrim.enable = true;
  services.fwupd.enable = true;
  services.openssh.enable = true;
  services.tailscale.enable = true;

  services.sanoid = {
    enable = true;
    interval = "hourly";
    # backupmedia
    templates.backupmedia = {
      daily = 3;
      monthly = 3;
      autoprune = true;
      autosnap = true;
    };
    datasets."bigrust18/media" = {
      useTemplate = [ "backupmedia" ];
      recursive = true;
    };
    extraArgs = [ "--debug" ];
  };

  services.syncoid = {
    enable = true;
    user = "root";
    interval = "hourly";
    commands = {
      "bigrust18/media" = {
        target = "root@deepthought:bigrust20/media";
        extraArgs = [ "--sshoption=StrictHostKeyChecking=off" ];
        recursive = true;
      };
    };
    commonArgs = [ "--debug"];
  };

  services.vscode-server.enable = true;

  services.samba-wsdd.enable = true; # make shares visible for windows 10 clients
  services.samba = {
    enable = true;
    securityType = "user";
    settings = {
      global = {
        "workgroup" = "WORKGROUP";
        "server string" = "morphnix";
        "netbios name" = "morphnix";
        "security" = "user";
        "guest ok" = "yes";
        "guest account" = "nobody";
        "map to guest" = "bad user";
        "load printers" = "no";
      };
    };
    shares = let
      mkShare = path: {
        path = path;
        browseable = "yes";
        "read only" = "no";
        "guest ok" = "yes";
        "create mask" = "0644";
        "directory mask" = "0755";
        "force user" = "alex";
        "force group" = "users";
      };
    in {
      jbod = mkShare "/mnt/jbod";
      bigrust18 = mkShare "/mnt/bigrust18";
      downloads = mkShare "/mnt/downloads";
    };
  };

  nix = {
    settings = {
        experimental-features = [ "nix-command" "flakes" ];
        warn-dirty = false;
    };
  };
}