diff --git a/flake.lock b/flake.lock index f532a855..da167358 100644 --- a/flake.lock +++ b/flake.lock @@ -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": { diff --git a/home/linux/gui/base/creative.nix b/home/linux/gui/base/creative.nix index bcf7621c..ad4de500 100644 --- a/home/linux/gui/base/creative.nix +++ b/home/linux/gui/base/creative.nix @@ -53,7 +53,7 @@ obs-command-source obs-move-transition obs-backgroundremoval - advanced-scene-switcher + # advanced-scene-switcher obs-pipewire-audio-capture ]; }; diff --git a/hosts/idols-ai/default.nix b/hosts/idols-ai/default.nix index e8618b1f..ddfe9ef9 100644 --- a/hosts/idols-ai/default.nix +++ b/hosts/idols-ai/default.nix @@ -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 diff --git a/hosts/idols-ai/hardware-configuration.nix b/hosts/idols-ai/hardware-configuration.nix index c82a51c6..005cf7f5 100644 --- a/hosts/idols-ai/hardware-configuration.nix +++ b/hosts/idols-ai/hardware-configuration.nix @@ -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; diff --git a/hosts/idols-ai/impermanence.nix b/hosts/idols-ai/impermanence.nix index ad983ee9..19d59086 100644 --- a/hosts/idols-ai/impermanence.nix +++ b/hosts/idols-ai/impermanence.nix @@ -130,6 +130,9 @@ # neovim plugins(wakatime & copilot) ".wakatime" ".config/github-copilot" + + # others + ".config/blender" ]; files = [ ".wakatime.cfg" diff --git a/hosts/idols-ai/nvidia.nix b/hosts/idols-ai/nvidia.nix new file mode 100644 index 00000000..f5a35af3 --- /dev/null +++ b/hosts/idols-ai/nvidia.nix @@ -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; + # }; + }) + ]; +}