2024-01-06 01:19:35 +01:00
|
|
|
# SPDX-FileCopyrightText: 2020-2023 Simon Bruder <simon@sbruder.de>
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
|
2020-12-06 10:53:40 +01:00
|
|
|
{ config, lib, modulesPath, pkgs, ... }:
|
2020-10-17 23:18:22 +02:00
|
|
|
|
|
|
|
{
|
2020-12-06 10:53:40 +01:00
|
|
|
boot = {
|
2023-02-11 22:53:54 +01:00
|
|
|
# Intel arc
|
2023-03-09 21:18:22 +01:00
|
|
|
kernelPackages = pkgs.linuxPackages_latest;
|
2022-05-07 12:34:25 +02:00
|
|
|
loader = {
|
|
|
|
grub.enable = false;
|
|
|
|
systemd-boot.enable = true;
|
|
|
|
efi.canTouchEfiVariables = true;
|
|
|
|
};
|
2020-12-06 10:53:40 +01:00
|
|
|
initrd = {
|
2024-03-19 17:10:38 +01:00
|
|
|
availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "virtio_blk" ];
|
2022-10-15 23:27:12 +02:00
|
|
|
kernelModules = [ "dm-snapshot" ];
|
2020-12-06 10:53:40 +01:00
|
|
|
};
|
|
|
|
};
|
2020-10-17 23:18:22 +02:00
|
|
|
|
2020-12-06 10:53:40 +01:00
|
|
|
fileSystems = {
|
|
|
|
"/" = {
|
2024-03-19 17:10:38 +01:00
|
|
|
device = "/dev/disk/by-uuid/db6c8826-ea3c-4bd6-bcb3-5a9ae3089519";
|
2021-05-04 23:15:05 +02:00
|
|
|
fsType = "btrfs";
|
2024-03-19 17:10:38 +01:00
|
|
|
options = [ "discard=async" "noatime" "compress=zstd" "ssd" ];
|
2020-10-17 23:18:22 +02:00
|
|
|
};
|
|
|
|
|
2020-12-06 10:53:40 +01:00
|
|
|
"/boot" = {
|
2024-03-19 17:10:38 +01:00
|
|
|
device = "/dev/disk/by-uuid/77DB-CC39";
|
2022-05-07 12:34:25 +02:00
|
|
|
fsType = "vfat";
|
2020-10-17 23:18:22 +02:00
|
|
|
};
|
2020-12-06 10:53:40 +01:00
|
|
|
};
|
2020-10-17 23:18:22 +02:00
|
|
|
|
2021-01-29 15:50:16 +01:00
|
|
|
# GPU
|
2023-02-11 22:53:54 +01:00
|
|
|
hardware.opengl = {
|
2023-08-19 10:49:11 +02:00
|
|
|
package = pkgs.mesa.drivers;
|
|
|
|
package32 = pkgs.pkgsi686Linux.mesa.drivers;
|
2023-02-11 22:53:54 +01:00
|
|
|
extraPackages = with pkgs; [
|
2023-08-19 10:49:11 +02:00
|
|
|
intel-compute-runtime
|
|
|
|
intel-compute-runtime.drivers
|
2023-02-11 22:53:54 +01:00
|
|
|
intel-media-driver
|
2023-08-19 10:49:11 +02:00
|
|
|
level-zero
|
2023-02-11 22:53:54 +01:00
|
|
|
libvdpau-va-gl
|
|
|
|
vaapiIntel
|
|
|
|
vaapiVdpau
|
2023-08-19 10:49:11 +02:00
|
|
|
];
|
2023-02-11 22:53:54 +01:00
|
|
|
};
|
2021-01-29 15:50:16 +01:00
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
clinfo
|
2023-02-11 22:53:54 +01:00
|
|
|
nvtop-amd # also returns basic stats for intel
|
2021-01-29 15:50:16 +01:00
|
|
|
];
|
2022-12-30 19:52:58 +01:00
|
|
|
|
2023-02-11 22:53:54 +01:00
|
|
|
security.wrappers."intel_gpu_top" = {
|
|
|
|
owner = "root";
|
|
|
|
group = "root";
|
|
|
|
capabilities = "cap_perfmon+p";
|
2023-08-19 10:49:11 +02:00
|
|
|
source = "${pkgs.intel-gpu-tools}/bin/intel_gpu_top";
|
2023-02-11 22:53:54 +01:00
|
|
|
};
|
2020-10-17 23:18:22 +02:00
|
|
|
}
|