add apollo gpu config

This commit is contained in:
2025-04-21 21:43:04 +08:00
parent 6dfc74bf0d
commit 110f451b13
2 changed files with 33 additions and 0 deletions

View File

@@ -17,6 +17,7 @@ in
# Import your generated (nixos-generate-config) hardware configuration
./hardware-configuration.nix
./hardware.nix
./networking.nix
"${self}/modules/nixos/core"
"${self}/modules/nixos/user.nix"

View File

@@ -0,0 +1,32 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, username, ... }:
{
hardware.opengl = {
enable = true;
extraPackages = with pkgs; [
vaapiIntel
intel-media-driver
];
};
fileSystems."/home/${username}/tmp" =
{
device = "none";
fsType = "tmpfs";
options = [ "uid=1000" "gid=100" "defaults" "size=16G" "mode=755" ];
};
fileSystems."/tmp" =
{
device = "tmpfs";
fsType = "tmpfs";
};
swapDevices = [{
device = "/var/swapfile";
size = 16 * 1024;
}];
}