feat: vfio

This commit is contained in:
Xory 2026-03-06 16:48:14 +02:00
parent 0b60474af8
commit 1059aa0026
3 changed files with 30 additions and 3 deletions

View file

@ -99,7 +99,7 @@
users.users.xory = {
isNormalUser = true;
description = "xory";
extraGroups = [ "networkmanager" "wheel" "docker" "libvirt" "dialout" ];
extraGroups = [ "networkmanager" "wheel" "docker" "libvirtd" "qemu-libvirtd" "kvm" "dialout" ];
shell = pkgs.zsh;
initialHashedPassword = "$6$JXLpG5JYMJgZndm9$0sC8uPJ99cYL.hNv3DFQ20ky8tiZoxioe9GlMEanTwAD99LJ175/bHtN6Bm6bYsQG1BVGRdmphnXEcWS9ApoK0"; # this is defined declaratively, i don't use passwd.
};
@ -149,8 +149,8 @@
"--env=GTK_THEME=Adwaita:dark"
];
};
signal-desktop-bin = {
executable = "${pkgs.signal-desktop-bin}/bin/signal-desktop";
signal-desktop = {
executable = "${pkgs.signal-desktop}/bin/signal-desktop";
profile = "${pkgs.firejail}/etc/firejail/signal-desktop.profile";
extraArgs = [
"--env=GTK_THEME=Adwaita:dark"

View file

@ -8,6 +8,10 @@
(inputs.nixos-hardware.nixosModules.framework-16-7040-amd)
];
specialisation."VFIO".configuration = {
imports = [ ./vfio.nix ];
};
services.fwupd.enable = true;
networking.hostName = "nullstar";

23
hosts/nullstar/vfio.nix Normal file
View file

@ -0,0 +1,23 @@
{ config, pkgs, ... }:
{
boot.kernelParams = [
"amd_iommu=on"
"iommu=pt"
"vfio-pci.ids=1002:7480,1002:ab30"
];
boot.initrd.kernelModules = [
"vfio"
"vfio_pci"
"vfio_iommu_type1"
];
systemd.tmpfiles.rules = [
"f /dev/shm/looking-glass 0660 xory qemu-libvirtd -"
];
environment.systemPackages = with pkgs; [
looking-glass-client
];
}