mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-03-19 16:21:29 +01: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:
12
flake.lock
generated
12
flake.lock
generated
@@ -738,11 +738,11 @@
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1725804652,
|
||||
"narHash": "sha256-KgSE/TQaomgbIO5KKKo6kgdlFlxVGpVn4eucGK3jl20=",
|
||||
"lastModified": 1726745347,
|
||||
"narHash": "sha256-R62oc4g0StxT9YnYTZr2RKkMzB4lJSSYdU1RGr0sWTM=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2f46ad5dd5c22cf18331773e346dfc5ae17edd88",
|
||||
"rev": "658403a838e66f5faa728f86c3618604a52e4970",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -754,11 +754,11 @@
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1725634671,
|
||||
"narHash": "sha256-v3rIhsJBOMLR8e/RNWxr828tB+WywYIoajrZKFM+0Gg=",
|
||||
"lastModified": 1726463316,
|
||||
"narHash": "sha256-gI9kkaH0ZjakJOKrdjaI/VbaMEo9qBbSUl93DnU7f4c=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "574d1eac1c200690e27b8eb4e24887f8df7ac27c",
|
||||
"rev": "99dc8785f6a0adac95f5e2ab05cc2e1bf666d172",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
obs-command-source
|
||||
obs-move-transition
|
||||
obs-backgroundremoval
|
||||
advanced-scene-switcher
|
||||
# advanced-scene-switcher
|
||||
obs-pipewire-audio-capture
|
||||
];
|
||||
};
|
||||
|
||||
@@ -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