nixos-config/machines/hitagi/hardware-configuration.nix

62 lines
1.4 KiB
Nix
Raw Normal View History

# 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 = {
# Intel arc
kernelPackages = pkgs.linuxPackages_latest;
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" ];
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";
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
# 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
];
2022-12-30 19:52:58 +01:00
security.wrappers."intel_gpu_top" = {
owner = "root";
group = "root";
capabilities = "cap_perfmon+p";
source = "${pkgs.intel-gpu-tools}/bin/intel_gpu_top";
};
2020-10-17 23:18:22 +02:00
}