75 lines
1.7 KiB
Nix
75 lines
1.7 KiB
Nix
# SPDX-FileCopyrightText: 2020-2023 Simon Bruder <simon@sbruder.de>
|
|
#
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
{ config, lib, modulesPath, pkgs, ... }:
|
|
|
|
{
|
|
imports = [
|
|
(modulesPath + "/installer/scan/not-detected.nix")
|
|
(modulesPath + "/profiles/qemu-guest.nix")
|
|
];
|
|
|
|
sbruder.machine.isVm = true;
|
|
|
|
boot = {
|
|
# Intel arc
|
|
kernelPackages = pkgs.linuxPackages_latest;
|
|
kernelParams = [ "console=ttyS0" ];
|
|
loader = {
|
|
grub.enable = false;
|
|
systemd-boot.enable = true;
|
|
efi.canTouchEfiVariables = true;
|
|
};
|
|
initrd = {
|
|
availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "virtio_blk" ];
|
|
kernelModules = [ "dm-snapshot" ];
|
|
};
|
|
};
|
|
|
|
fileSystems = {
|
|
"/" = {
|
|
device = "/dev/disk/by-uuid/db6c8826-ea3c-4bd6-bcb3-5a9ae3089519";
|
|
fsType = "btrfs";
|
|
options = [ "discard=async" "noatime" "compress=zstd" "ssd" ];
|
|
};
|
|
|
|
"/boot" = {
|
|
device = "/dev/disk/by-uuid/77DB-CC39";
|
|
fsType = "vfat";
|
|
};
|
|
|
|
"/data/steam" = {
|
|
device = "steam";
|
|
fsType = "virtiofs";
|
|
};
|
|
};
|
|
|
|
# GPU
|
|
hardware.opengl = {
|
|
package = pkgs.mesa.drivers;
|
|
package32 = pkgs.pkgsi686Linux.mesa.drivers;
|
|
extraPackages = with pkgs; [
|
|
intel-compute-runtime
|
|
intel-compute-runtime.drivers
|
|
intel-media-driver
|
|
level-zero
|
|
libvdpau-va-gl
|
|
vaapiIntel
|
|
vaapiVdpau
|
|
];
|
|
};
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
clinfo
|
|
nvtop-amd # also returns basic stats for intel
|
|
];
|
|
|
|
security.wrappers."intel_gpu_top" = {
|
|
owner = "root";
|
|
group = "root";
|
|
capabilities = "cap_perfmon+p";
|
|
source = "${pkgs.intel-gpu-tools}/bin/intel_gpu_top";
|
|
};
|
|
}
|