Switch to unfree NVIDIA drivers and use Blender-bin to use CUDA

This commit is contained in:
Jimbo 2024-08-26 19:43:59 -04:00
parent 08948089a3
commit 0060e25fde
8 changed files with 57 additions and 58 deletions

View file

@ -1,5 +1,22 @@
{
"nodes": {
"blender-bin": {
"inputs": {
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1724347557,
"narHash": "sha256-0eqXNM4mulNroWyx5h1ICDJQfY79jwW9KqMFHRstjP0=",
"rev": "9062c70ff62d9718485733f5cd5b25cd87875772",
"revCount": 120,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/edolstra/blender-bin/1.0.8/01917b20-9eba-7b35-90c8-a4db33d22a81/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/edolstra/blender-bin/1.0.8.tar.gz"
}
},
"blobs": {
"flake": false,
"locked": {
@ -32,26 +49,6 @@
"type": "gitlab"
}
},
"disko": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1724349583,
"narHash": "sha256-zgB1Cfk46irIsto8666yLdKjqKdBrjR48Dd3lhQ0CnQ=",
"owner": "nix-community",
"repo": "disko",
"rev": "435737144be0259559ca3b43f7d72252b1fdcc1b",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "disko",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
@ -125,7 +122,7 @@
"inputs": {
"blobs": "blobs",
"flake-compat": "flake-compat",
"nixpkgs": "nixpkgs",
"nixpkgs": "nixpkgs_2",
"nixpkgs-24_05": "nixpkgs-24_05"
},
"locked": {
@ -146,7 +143,7 @@
"inputs": {
"blobs": "blobs_2",
"flake-compat": "flake-compat_2",
"nixpkgs": "nixpkgs_2",
"nixpkgs": "nixpkgs_3",
"nixpkgs-24_05": "nixpkgs-24_05_2",
"utils": "utils"
},
@ -167,16 +164,15 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1717602782,
"narHash": "sha256-pL9jeus5QpX5R+9rsp3hhZ+uplVHscNJh8n8VpqscM0=",
"lastModified": 1722221733,
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e8057b67ebf307f01bdcc8fba94d94f75039d1f6",
"rev": "12bf09802d77264e441f48e25459c10c93eada2e",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-unstable",
"ref": "nixos-24.05",
"type": "indirect"
}
},
@ -242,6 +238,21 @@
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1717602782,
"narHash": "sha256-pL9jeus5QpX5R+9rsp3hhZ+uplVHscNJh8n8VpqscM0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e8057b67ebf307f01bdcc8fba94d94f75039d1f6",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-unstable",
"type": "indirect"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1724242322,
"narHash": "sha256-HMpK7hNjhEk4z5SFg5UtxEio9OWFocHdaQzCfW1pE7w=",
@ -274,12 +285,12 @@
},
"root": {
"inputs": {
"disko": "disko",
"blender-bin": "blender-bin",
"hardware": "hardware",
"home-manager": "home-manager",
"mail": "mail",
"nixos-mailserver": "nixos-mailserver",
"nixpkgs": "nixpkgs_3",
"nixpkgs": "nixpkgs_4",
"nixpkgs-unstable": "nixpkgs-unstable",
"nur": "nur"
}

View file

@ -8,13 +8,10 @@
nur.url = "github:nix-community/NUR";
mail.url = "gitlab:simple-nixos-mailserver/nixos-mailserver";
nixos-mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-24.05";
blender-bin.url = "https://flakehub.com/f/edolstra/blender-bin/1.0.8.tar.gz";
# NixOS utils
hardware.url = "github:nixos/nixos-hardware/master";
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
# Home manager
home-manager = {
@ -24,16 +21,17 @@
};
outputs = {
self,
nixpkgs,
home-manager,
self,
nixpkgs,
nur,
blender-bin,
nixos-mailserver,
home-manager,
...
} @inputs: let
inherit (self) outputs;
forAllSystems = nixpkgs.lib.genAttrs [
"aarch64-linux"
"aarch64-linux"
"x86_64-linux"
];
in rec {

View file

@ -21,6 +21,7 @@
outputs.overlays.additions
outputs.overlays.modifications
outputs.overlays.unstable-packages
inputs.blender-bin.overlays.default
];
# Configure your nixpkgs instance
config = {

View file

@ -18,7 +18,7 @@
./guiapps/easyeffects.nix
./tuiapps/ncmpcpp.nix
# Misc Apps
# Misc apps and tools
./misc/useful.nix
./misc/avtools.nix
./misc/filemanager.nix

View file

@ -3,7 +3,7 @@
krita
inkscape
audacity
blender
blender_4_2
sunvox
];
}

View file

@ -98,7 +98,7 @@
# Communication
"${ws.w3a}" = [{class = "zoom";}];
"${ws.w7}" = [{app_id = "MiscBrowser";} {app_id = "vesktop";}];
"${ws.w8}" = [{class = "Element";}];
"${ws.w8}" = [{app_id = "Element";}];
"${ws.w9}" = [{app_id = "thunderbird";}];
# Else

View file

@ -1,11 +1,5 @@
# This file was initially made by 'nixos-generate-config', try not to edit too much
{
config,
lib,
pkgs,
modulesPath,
...
}: let
{ config, lib, pkgs, modulesPath, ... }: let
# Set common boot paramaters
commonKernelParams = [
# Nvidia settings

View file

@ -1,4 +1,4 @@
{config, ... }: {
{pkgs, config, ... }: {
# Enable video drivers
services.xserver.videoDrivers = ["nvidia"];
@ -6,17 +6,12 @@
modesetting.enable = true;
nvidiaSettings = false;
package = config.boot.kernelPackages.nvidiaPackages.beta;
open = true;
open = false;
};
pkgs.stdenv.mkDerivation {
name = "cuda-env-shell";
buildInputs = with pkgs; [
cudatoolkit
];
shellHook = ''
export CUDA_PATH=${pkgs.cudatoolkit}
export EXTRA_LDFLAGS="-L/lib -L${pkgs.linuxPackages.nvidia_x11}/lib"
export EXTRA_CCFLAGS="-I/usr/include"
'';
environment.sessionVariables = {
CUDA_PATH = "${pkgs.cudatoolkit}";
EXTRA_LDFLAGS = "-L/lib -L${pkgs.linuxPackages.nvidia_x11}/lib";
EXTRA_CCFLAGS = "-I/usr/include";
};
}