From 6b29a67269d3617ff26cc30dbbfc4a31a092d531 Mon Sep 17 00:00:00 2001 From: Filippo Berto Date: Sun, 20 Nov 2022 09:36:28 +0100 Subject: [PATCH] Switch to cuda support configuration --- flake.lock | 12 ++++++------ flake.nix | 12 ++++++------ odin/hm.nix | 2 +- thor/hm.nix | 2 +- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/flake.lock b/flake.lock index 7a97338..65e3701 100644 --- a/flake.lock +++ b/flake.lock @@ -77,11 +77,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1668343973, - "narHash": "sha256-ZGiIS9TiGt19KJt9FwYd4hUHnyN3+6A2uqtuUBXtLWo=", + "lastModified": 1668766498, + "narHash": "sha256-UjZlIrbHGlL3H3HZNPTxPSwJfr49jIfbPWCYxk0EQm4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "664b342ce0bba16adbf64f039341ed98390efda8", + "rev": "f42a45c015f28ac3beeb0df360e50cdbf495d44b", "type": "github" }, "original": { @@ -93,11 +93,11 @@ }, "nixpkgs-u": { "locked": { - "lastModified": 1668087632, - "narHash": "sha256-T/cUx44aYDuLMFfaiVpMdTjL4kpG7bh0VkN6JEM78/E=", + "lastModified": 1668765800, + "narHash": "sha256-rC40+/W6Hio7b/RsY8SvQPKNx4WqNcTgfYv8cUMAvJk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5f588eb4a958f1a526ed8da02d6ea1bea0047b9f", + "rev": "52b2ac8ae18bbad4374ff0dd5aeee0fdf1aea739", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index eabc7c9..d70af49 100644 --- a/flake.nix +++ b/flake.nix @@ -45,7 +45,7 @@ }: let - config = { + defaultConfig = { allowUnfree = true; extraOptions = "experimental-features = nix-command flakes"; permittedInsecurePackages = [ "electron-9.4.4" ]; # authy dependency @@ -77,7 +77,7 @@ }) ]; - modulesBuilder = { system }: + modulesBuilder = { system, config ? defaultConfig }: let overlays = overlaysBuilder { inherit system; }; in [ # Nix configuration @@ -99,10 +99,10 @@ ./nixos_modules/zerotier.nix ]; - pkgs = { system }: + pkgs = { system, config ? defaultConfig }: let overlays = overlaysBuilder { inherit system; }; in import nixpkgs { inherit system config overlays; }; - pkgs-u = { system }: + pkgs-u = { system, config ? defaultConfig }: let overlays = overlaysBuilder { inherit system; }; in import nixpkgs-u { inherit system config overlays; }; @@ -130,7 +130,7 @@ odinNvidiaBuilder = { extraModules ? [ ] }: nixpkgs.lib.nixosSystem rec { system = "x86_64-linux"; - modules = (modulesBuilder { inherit system; }) + modules = (modulesBuilder { inherit system; config = defaultConfig // { cudaSupport = true; }; }) ++ odinBaseModules ++ odinNvidiaModules ++ [{ home-manager.users.bertof = import ./odin/hm.nix; }] ++ extraModules; @@ -149,7 +149,7 @@ thorBuilder = { extraModules ? [ ] }: nixpkgs.lib.nixosSystem rec { system = "x86_64-linux"; - modules = (modulesBuilder { inherit system; }) + modules = (modulesBuilder { inherit system; config = defaultConfig // { cudaSupport = true; }; }) ++ thorBaseModules ++ [{ home-manager.users.bertof = import ./thor/hm.nix; }] ++ extraModules; diff --git a/odin/hm.nix b/odin/hm.nix index 3cd9704..3e91c78 100644 --- a/odin/hm.nix +++ b/odin/hm.nix @@ -85,7 +85,7 @@ unstable.thunderbird transmission-gtk unrar - # (unstable.blender.override { cudaSupport = true; }) + blender unstable.tdesktop unstable.zotero unzip diff --git a/thor/hm.nix b/thor/hm.nix index 49aece9..33bd15b 100644 --- a/thor/hm.nix +++ b/thor/hm.nix @@ -73,7 +73,7 @@ teams unstable.thunderbird transmission-gtk - (unstable.blender.override { cudaSupport = true; }) + unstable.blender unstable.zotero virt-manager # wineFull