mirror of
https://github.com/blahai/nyx.git
synced 2025-01-18 11:00:20 +00:00
Global: fix pci passtrough. Nyx: bunch of old changes
This commit is contained in:
parent
c3dbd37098
commit
8055d2c8c1
3 changed files with 34 additions and 33 deletions
|
@ -19,7 +19,7 @@
|
|||
};
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
kernelPackages = pkgs.linuxPackages_cachyos;
|
||||
kernelPackages = pkgs.linuxPackages_zen;
|
||||
kernel = {
|
||||
sysctl ={
|
||||
"vm.max_map_count" = 2147483642;
|
||||
|
@ -27,13 +27,6 @@
|
|||
};
|
||||
};
|
||||
|
||||
virtualisation = {
|
||||
docker = {
|
||||
enable = true;
|
||||
storageDriver = "btrfs";
|
||||
};
|
||||
};
|
||||
|
||||
zramSwap = {
|
||||
enable = true;
|
||||
algorithm = "zstd";
|
||||
|
@ -82,20 +75,9 @@
|
|||
};
|
||||
};
|
||||
|
||||
cloudflared = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
gnome.gnome-keyring.enable = true;
|
||||
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
|
@ -103,7 +85,7 @@
|
|||
users.users.pingu = {
|
||||
isNormalUser = true;
|
||||
description = "Elissa";
|
||||
extraGroups = [ "networkmanager" "wheel" "docker" ];
|
||||
extraGroups = [ "networkmanager" "wheel" "input" "render" ];
|
||||
shell = pkgs.fish;
|
||||
packages = with pkgs; [
|
||||
floorp
|
||||
|
@ -192,12 +174,16 @@
|
|||
};
|
||||
};
|
||||
|
||||
qt.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
age
|
||||
ssh-to-age
|
||||
sops
|
||||
cloudflared
|
||||
inputs.zen-browser.packages."${pkgs.system}".specific
|
||||
cava
|
||||
socat
|
||||
btrfs-progs
|
||||
btop
|
||||
hyprcursor
|
||||
|
@ -243,6 +229,8 @@
|
|||
material-design-icons
|
||||
material-symbols
|
||||
imagemagick
|
||||
wireguard-tools
|
||||
mission-center
|
||||
];
|
||||
|
||||
fonts.packages = with pkgs; [
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "ahci" "xhci_pci" "usbhid" "hid_generic" "uas" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||
boot.kernelModules = [ "kvm-amd" "amd-pstate" "amdgpu" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" "amd-pstate" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
|
|
|
@ -1,12 +1,23 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
platform = "amd";
|
||||
vfioIds = [ "" "" ];
|
||||
in {
|
||||
{
|
||||
boot = {
|
||||
kernelModules = [ "kvm-${platform}" "vfio_virqfd" "vfio_pci" "vfio_iommu_type1" "vfio" ];
|
||||
kernelParams = [ "${platform}_iommu=on" "${platform}_iommu=pt" "kvm.ignore_msrs=1" ];
|
||||
extraModprobeConfig = "options vfio-pci ids=${builtins.concatStringsSep "," vfioIds}";
|
||||
initrd.kernelModules = lib.mkBefore [
|
||||
"kvm-amd"
|
||||
"vfio_pci"
|
||||
"vfio_iommu_type1"
|
||||
"vfio"
|
||||
|
||||
"amdgpu"
|
||||
];
|
||||
kernelParams = [
|
||||
"amd_iommu=on"
|
||||
"amd_iommu=pt"
|
||||
"kvm.ignore_msrs=1"
|
||||
"vfio-pci.ids=1002:67df,1002:aaf0"
|
||||
];
|
||||
extraModprobeConfig = ''
|
||||
softdep drm pre: vfio-pci
|
||||
'';
|
||||
};
|
||||
|
||||
virtualisation = {
|
||||
|
@ -14,11 +25,11 @@ in {
|
|||
enable = true;
|
||||
onBoot = "ignore";
|
||||
onShutdown = "shutdown";
|
||||
};
|
||||
|
||||
qemu = {
|
||||
package = pkgs.qemu_kvm;
|
||||
ovmf.enable = true;
|
||||
qemu = {
|
||||
package = pkgs.qemu_kvm;
|
||||
ovmf.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
docker = {
|
||||
|
@ -26,6 +37,8 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
users.users.pingu.extraGroups = [ "qemu-libvirtd" "libvirtd" "disk" "kvm" "docker" ];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
virt-manager
|
||||
];
|
||||
|
|
Loading…
Reference in a new issue