mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-23 09:18:35 +02:00
fix: blender runtime crash - https://github.com/NixOS/nixpkgs/pull/340100
fix: advanced-scene-switcher failed to compile, persist blender user directory
This commit is contained in:
@@ -11,6 +11,7 @@ in {
|
||||
./netdev-mount.nix
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
./nvidia.nix
|
||||
|
||||
./impermanence.nix
|
||||
./secureboot.nix
|
||||
@@ -28,27 +29,6 @@ in {
|
||||
# conflict with feature: containerd-snapshotter
|
||||
# virtualisation.docker.storageDriver = "btrfs";
|
||||
|
||||
# for Nvidia GPU
|
||||
services.xserver.videoDrivers = ["nvidia"]; # will install nvidia-vaapi-driver by default
|
||||
hardware.nvidia = {
|
||||
open = false;
|
||||
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
||||
# https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/os-specific/linux/nvidia-x11/default.nix
|
||||
# package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
|
||||
# required by most wayland compositors!
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = true;
|
||||
};
|
||||
hardware.nvidia-container-toolkit.enable = true;
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
# needed by nvidia-docker
|
||||
enable32Bit = true;
|
||||
};
|
||||
# https://nixos.org/manual/nixpkgs/unstable/#opt-cudaSupport
|
||||
nixpkgs.config.cudaSupport = true;
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-intel"]; # kvm virtualization support
|
||||
boot.extraModprobeConfig = "options kvm_intel nested=1"; # for intel cpu
|
||||
boot.kernelParams = ["nvidia.NVreg_PreserveVideoMemoryAllocations=1"];
|
||||
boot.extraModulePackages = [];
|
||||
# clear /tmp on boot to get a stateless /tmp directory.
|
||||
boot.tmp.cleanOnBoot = true;
|
||||
|
||||
@@ -130,6 +130,9 @@
|
||||
# neovim plugins(wakatime & copilot)
|
||||
".wakatime"
|
||||
".config/github-copilot"
|
||||
|
||||
# others
|
||||
".config/blender"
|
||||
];
|
||||
files = [
|
||||
".wakatime.cfg"
|
||||
|
||||
41
hosts/idols-ai/nvidia.nix
Normal file
41
hosts/idols-ai/nvidia.nix
Normal file
@@ -0,0 +1,41 @@
|
||||
{pkgs-unstable, ...}: {
|
||||
# ===============================================================================================
|
||||
# for Nvidia GPU
|
||||
# ===============================================================================================
|
||||
|
||||
boot.kernelParams = ["nvidia.NVreg_PreserveVideoMemoryAllocations=1"];
|
||||
services.xserver.videoDrivers = ["nvidia"]; # will install nvidia-vaapi-driver by default
|
||||
hardware.nvidia = {
|
||||
open = false;
|
||||
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
||||
# https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/os-specific/linux/nvidia-x11/default.nix
|
||||
# package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
|
||||
# required by most wayland compositors!
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = true;
|
||||
};
|
||||
hardware.nvidia-container-toolkit.enable = true;
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
# needed by nvidia-docker
|
||||
enable32Bit = true;
|
||||
};
|
||||
# disable cudasupport before this issue get fixed:
|
||||
# https://github.com/NixOS/nixpkgs/issues/338315
|
||||
nixpkgs.config.cudaSupport = false;
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(_: super: {
|
||||
blender = super.blender.override {
|
||||
# https://nixos.org/manual/nixpkgs/unstable/#opt-cudaSupport
|
||||
cudaSupport = true;
|
||||
waylandSupport = true;
|
||||
};
|
||||
|
||||
# ffmpeg-full = super.ffmpeg-full.override {
|
||||
# withNvcodec = true;
|
||||
# };
|
||||
})
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user