CUDA failing to build

error: cannot download libcublas-linux-x86_64-12.8.4.1-archive.tar.xz from any mirror

Full log

Important part:

downloading 'https://cache.nixos.org/nar/0xj9lkamcx39yl15536gwhyvm8ipp9p5gbj5jbqj7qy0f4janx7a.nar.xz'...
 11  307M   11 33.8M    0     0  48183      0  1:51:32  0:12:16  1:39:16 24422
curl: (56) OpenSSL SSL_read: OpenSSL/3.4.2: error:0A000126:SSL routines::unexpected eof while reading, errno 0
Warning: Problem (retrying all errors). Will retry in 4 seconds. 1 retry left.
Compiling       build/obj/device/gensrc/all_reduce_sum_f64.cu
remote: Enumerating objects: 46, done.        
remote: Counting objects: 100% (46/46), done.        
remote: Compressing objects: 100% (44/44), done.        
remote: Total 46 (delta 0), reused 23 (delta 0), pack-reused 0 (from 0)        
Receiving objects: 100% (46/46), 71.49 KiB | 9.00 KiB/s, done.
Cloning into '/nix/store/hv4pn4wbg2zxibddkkgfg2avz7f2whd9-source/plugins/LadspaEffect/tap/tap-plugins'...
remote: Enumerating objects: 33, done.        
remote: Counting objects: 100% (33/33), done.        
remote: Compressing objects: 100% (21/21), done.        
remote: Total 33 (delta 12), reused 28 (delta 11), pack-reused 0 (from 0)        
Receiving objects: 100% (33/33), 73.71 KiB | 23.00 KiB/s, done.
Resolving deltas: 100% (12/12), done.
Cloning into '/nix/store/hv4pn4wbg2zxibddkkgfg2avz7f2whd9-source/plugins/LadspaEffect/cmt/cmt'...
remote: Enumerating objects: 65, done.        
remote: Counting objects: 100% (65/65), done.        
remote: Compressing objects: 100% (62/62), done.        
remote: Total 65 (delta 22), reused 12 (delta 2), pack-reused 0 (from 0)        
Receiving objects: 100% (65/65), 83.53 KiB | 18.00 KiB/s, done.
Resolving deltas: 100% (22/22), done.
Cloning into '/nix/store/hv4pn4wbg2zxibddkkgfg2avz7f2whd9-source/src/3rdparty/hiir/hiir'...
remote: Enumerating objects: 163, done.        
remote: Counting objects: 100% (163/163), done.        
remote: Compressing objects: 100% (17/17), done.        
remote: Total 163 (delta 147), reused 158 (delta 146), pack-reused 0 (from 0)        
Receiving objects: 100% (163/163), 99.34 KiB | 15.00 KiB/s, done.
Resolving deltas: 100% (147/147), done.
Cloning into '/nix/store/hv4pn4wbg2zxibddkkgfg2avz7f2whd9-source/plugins/CarlaBase/carla'...
remote: Enumerating objects: 2370, done.        
remote: Counting objects: 100% (2370/2370), done.        
remote: Compressing objects: 100% (2020/2020), done.        
Compiling       build/obj/device/gensrc/all_reduce_sum_f8e4m3.cu
copying path '/nix/store/1ryp38mqsz1vwlmarsdyypv0wz9k8v3i-kmod-31-lib' from 'https://cache.nixos.org'...
downloading 'https://cache.nixos.org/nar/1jnil81x89ns2xyy55ah994rpmxjgyd2l1j17ldfyjgf4b13by69.nar.xz'...
copying path '/nix/store/qp5r0xa2d8swcpqd9if1nkrm1c4n6f7b-libarchive-3.8.0-lib' from 'https://cache.nixos.org'...
downloading 'https://cache.nixos.org/nar/17r25hglrig96pwjlrj40j9qm6lgmgky0j2cr3j24bgjqzfycn5i.nar.xz'...
Compiling       build/obj/device/gensrc/all_reduce_sum_f8e5m2.cu
remote: Total 2370 (delta 550), reused 1250 (delta 285), pack-reused 0 (from 0)        
Receiving objects: 100% (2370/2370), 7.69 MiB | 102.00 KiB/s, done.
Resolving deltas: 100% (550/550), done.
Cloning into '/nix/store/hv4pn4wbg2zxibddkkgfg2avz7f2whd9-source/plugins/Sid/resid/resid'...
remote: Enumerating objects: 42, done.        
remote: Counting objects: 100% (42/42), done.        
remote: Compressing objects: 100% (36/36), done.        
remote: Total 42 (delta 18), reused 18 (delta 6), pack-reused 0 (from 0)        
Receiving objects: 100% (42/42), 85.97 KiB | 13.00 KiB/s, done.
Resolving deltas: 100% (18/18), done.
Cloning into '/nix/store/hv4pn4wbg2zxibddkkgfg2avz7f2whd9-source/plugins/FreeBoy/game-music-emu'...
remote: Enumerating objects: 175, done.        
remote: Counting objects: 100% (175/175), done.        
remote: Compressing objects: 100% (170/170), done.        
remote: Total 175 (delta 16), reused 36 (delta 3), pack-reused 0 (from 0)        
Receiving objects: 100% (175/175), 378.25 KiB | 28.00 KiB/s, done.
Resolving deltas: 100% (16/16), done.
Cloning into '/nix/store/hv4pn4wbg2zxibddkkgfg2avz7f2whd9-source/src/3rdparty/mingw-std-threads'...
remote: Enumerating objects: 22, done.        
remote: Counting objects: 100% (22/22), done.        
remote: Compressing objects: 100% (22/22), done.        
remote: Total 22 (delta 0), reused 15 (delta 0), pack-reused 0 (from 0)        
Receiving objects: 100% (22/22), 40.09 KiB | 25.00 KiB/s, done.
Cloning into '/nix/store/hv4pn4wbg2zxibddkkgfg2avz7f2whd9-source/src/3rdparty/weakjack/weakjack'...
remote: Enumerating objects: 7, done.        
remote: Counting objects: 100% (7/7), done.        
remote: Compressing objects: 100% (6/6), done.        
remote: Total 7 (delta 0), reused 3 (delta 0), pack-reused 0 (from 0)        
Receiving objects: 100% (7/7), 10.34 KiB | 141.00 KiB/s, done.
Cloning into '/nix/store/hv4pn4wbg2zxibddkkgfg2avz7f2whd9-source/src/3rdparty/qt5-x11embed'...
remote: Enumerating objects: 13, done.        
remote: Counting objects: 100% (13/13), done.        
remote: Compressing objects: 100% (11/11), done.        
remote: Total 13 (delta 1), reused 7 (delta 0), pack-reused 0 (from 0)        
Receiving objects: 100% (13/13), 35.14 KiB | 5.86 MiB/s, done.
Resolving deltas: 100% (1/1), done.
Cloning into '/nix/store/hv4pn4wbg2zxibddkkgfg2avz7f2whd9-source/plugins/LadspaEffect/swh/ladspa'...
remote: Enumerating objects: 221, done.        
remote: Counting objects: 100% (221/221), done.        
remote: Compressing objects: 100% (195/195), done.        
remote: Total 221 (delta 36), reused 147 (delta 23), pack-reused 0 (from 0)        
Receiving objects: 100% (221/221), 483.62 KiB | 21.00 KiB/s, done.
Resolving deltas: 100% (36/36), done.
Cloning into '/nix/store/hv4pn4wbg2zxibddkkgfg2avz7f2whd9-source/src/3rdparty/ringbuffer'...
remote: Enumerating objects: 37, done.        
remote: Counting objects: 100% (37/37), done.        
remote: Compressing objects: 100% (30/30), done.        
remote: Total 37 (delta 0), reused 17 (delta 0), pack-reused 0 (from 0)        
Receiving objects: 100% (37/37), 52.73 KiB | 34.00 KiB/s, done.
Cloning into '/nix/store/hv4pn4wbg2zxibddkkgfg2avz7f2whd9-source/plugins/Xpressive/exprtk'...
remote: Enumerating objects: 36, done.        
remote: Counting objects: 100% (36/36), done.        
remote: Compressing objects: 100% (21/21), done.        
remote: Total 36 (delta 19), reused 23 (delta 14), pack-reused 0 (from 0)        
Receiving objects: 100% (36/36), 1.47 MiB | 49.00 KiB/s, done.
Resolving deltas: 100% (19/19), done.
Cloning into '/nix/store/hv4pn4wbg2zxibddkkgfg2avz7f2whd9-source/src/3rdparty/jack2'...
remote: Enumerating objects: 668, done.        
remote: Counting objects: 100% (668/668), done.        
remote: Compressing objects: 100% (617/617), done.        
remote: Total 668 (delta 176), reused 238 (delta 41), pack-reused 0 (from 0)        
Receiving objects: 100% (668/668), 1.15 MiB | 64.00 KiB/s, done.
Resolving deltas: 100% (176/176), done.
Cloning into '/nix/store/hv4pn4wbg2zxibddkkgfg2avz7f2whd9-source/plugins/ZynAddSubFx/zynaddsubfx'...
remote: Enumerating objects: 302, done.        
remote: Counting objects: 100% (302/302), done.        
remote: Compressing objects: 100% (299/299), done.        
remote: Total 302 (delta 37), reused 119 (delta 2), pack-reused 0 (from 0)        
Receiving objects: 100% (302/302), 1.50 MiB | 45.00 KiB/s, done.
Resolving deltas: 100% (37/37), done.
Cloning into '/nix/store/hv4pn4wbg2zxibddkkgfg2avz7f2whd9-source/plugins/OpulenZ/adplug'...
remote: Enumerating objects: 845, done.        
remote: Counting objects: 100% (845/845), done.        
remote: Compressing objects: 100% (552/552), done.        
remote: Total 845 (delta 323), reused 652 (delta 275), pack-reused 0 (from 0)        
Receiving objects: 100% (845/845), 2.77 MiB | 66.00 KiB/s, done.
Resolving deltas: 100% (323/323), done.
Cloning into '/nix/store/hv4pn4wbg2zxibddkkgfg2avz7f2whd9-source/plugins/LadspaEffect/calf/veal'...
remote: Enumerating objects: 802, done.        
remote: Counting objects: 100% (802/802), done.        
remote: Compressing objects: 100% (736/736), done.        
copying path '/nix/store/aakri4kzhxb04hij6fz99a2r8d8sbbxa-libarchive-3.8.1-lib' from 'https://cache.nixos.org'...
downloading 'https://cache.nixos.org/nar/1sv4lcaigyanmc0mj4s7zxq28k93xvh11r5h4277ma4cbkvnpypc.nar.xz'...
Compiling       build/obj/device/gensrc/all_reduce_sum_u32.cu
copying path '/nix/store/m3q5m5cska57fd2nxfxhjagbm4c80nac-libbpf-1.5.0' from 'https://cache.nixos.org'...
downloading 'https://cache.nixos.org/nar/17gs345k5ayan8vah04v3354phidvaxvfi0a7vv7myk73kcrb000.nar.xz'...
Compiling       build/obj/device/gensrc/all_reduce_sum_u64.cu
  0  895M    0 4160k    0     0  16833      0 15:29:22  0:04:13 15:25:09     0
curl: (56) OpenSSL SSL_read: OpenSSL/3.4.2: error:0A000126:SSL routines::unexpected eof while reading, errno 0
  3  108M    3 3718k    0     0  17118      0  1:51:16  0:03:42  1:47:34     0
curl: (56) OpenSSL SSL_read: OpenSSL/3.4.2: error:0A000126:SSL routines::unexpected eof while reading, errno 0
Warning: Problem (retrying all errors). Will retry in 4 seconds. 1 retry left.
  8  358M    8 30.8M    0     0  38281      0  2:43:35  0:14:04  2:29:31     0
curl: (56) OpenSSL SSL_read: OpenSSL/3.4.2: error:0A000126:SSL routines::unexpected eof while reading, errno 0
Warning: Problem (retrying all errors). Will retry in 4 seconds. 1 retry left.
 19  244M   19 46.5M    0     0  48795      0  1:27:32  0:16:41  1:10:51     0
curl: (56) OpenSSL SSL_read: OpenSSL/3.4.2: error:0A000126:SSL routines::unexpected eof while reading, errno 0
Warning: Problem (retrying all errors). Will retry in 4 seconds. 1 retry left.
  0  881M    0 3877k    0     0  17420      0 14:43:59  0:03:47 14:40:12     0
curl: (56) OpenSSL SSL_read: OpenSSL/3.4.2: error:0A000126:SSL routines::unexpected eof while reading, errno 0
Warning: Problem (retrying all errors). Will retry in 4 seconds. 1 retry left.
error: cannot download libcublas-linux-x86_64-12.8.4.1-archive.tar.xz from any mirror
error: builder for '/nix/store/pr24fpsw14m6yp2gw3b3srv4q1w076aw-libcublas-linux-x86_64-12.8.4.1-archive.tar.xz.drv' failed with exit code 1
error: 1 dependencies of derivation '/nix/store/naw58pd0znkhlbqdqmhn6q06bka92nvx-libcublas-12.8.4.1.drv' failed to build
error: 1 dependencies of derivation '/nix/store/x5wzrb3742zw41r13fynr00p80nj4ddd-onnxruntime-1.22.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/w3igzyzbjnpw71jbs49dhlkcrq3w0a9h-opencv-4.11.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/wyxgcyq88wj0k5dyl2vqxbs5kdxcz3q0-suitesparse-5.13.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/gll83h2dx419dwrm9pr0k3r28k2mjblm-firefox-unwrapped-143.0.4.drv' failed to build
copying path '/nix/store/6g4bg475h3xf2sq2h6h687csk24hrf7g-libbpf-1.6.2' from 'https://cache.nixos.org'...
error: 1 dependencies of derivation '/nix/store/gb2f127mvjpzs3jdj23b3dg7cq5y6grf-gegl-0.4.64.drv' failed to build
error: 1 dependencies of derivation '/nix/store/0p3wkxq56mn8ybmvc1yvlcgnhxczz1iw-gmic-3.5.4.drv' failed to build
copying path '/nix/store/b9ypzrxvpwiwbif7rmaba61vnz2qcl40-libproxy-0.5.11' from 'https://cache.nixos.org'...
downloading 'https://cache.nixos.org/nar/0vzcflm1a1g1w148vcyb247c4373jvmxmwccdh74pxv78ikhkp1x.nar.xz'...
downloading 'https://cache.nixos.org/nar/0rpw1m25720piflfl79ahcyvia1nyspdh9039lipw1f1a69jsal0.nar.xz'...
error: 1 dependencies of derivation '/nix/store/wa4s3sxbg9vm4q50gxh44n6w9dib0ij0-librewolf-unwrapped-143.0.4-1.drv' failed to build
error: 1 dependencies of derivation '/nix/store/gqij3biw2fjhlmag9bwv8qykski22qf1-thunderbird-unwrapped-143.0.1.drv' failed to build
copying path '/nix/store/fvwqcg1xsfk4rav5q9pqlq1610gj70dr-libtiff-4.7.0' from 'https://cache.nixos.org'...
error: 1 dependencies of derivation '/nix/store/jyglyayp0fq60kwb7dxcvj8v8npn3ffd-user-environment.drv' failed to build
copying path '/nix/store/jkwz1zvfx2gwr2sdrcaryhpan3n73r9g-libtiff-4.7.0-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/i5qj162v57kcs7hx11726jb1a3kwm19b-tpm2-tss-4.1.3' from 'https://cache.nixos.org'...
copying path '/nix/store/z1rgb0k38861dl1f27y6aa6k8c8kaki2-zstd-1.5.7-bin' from 'https://cache.nixos.org'...
copying path '/nix/store/96z9wd4p0ivjy2jl8pvgm29rhjhw1v3i-zvbi-0.2.44' from 'https://cache.nixos.org'...
copying path '/nix/store/gd38fp6gz670mvfffdk62hrjiy9757l7-zvbi-0.2.44' from 'https://cache.nixos.org'...
copying path '/nix/store/xi47aq9v6mzr31p0a2bzmr7qk11h1qrk-zxing-cpp-2.3.0' from 'https://cache.nixos.org'...
downloading 'https://cache.nixos.org/nar/1rdbnz6dyqdnjp6ng0ig830cz7r2fncwv9v5522ga3ccm1zrk21j.nar.xz'...
downloading 'https://cache.nixos.org/nar/1zifmpfsflggk88fz3aymixy32d95sdvf2gh7dl550bv1mmajh7w.nar.xz'...
downloading 'https://cache.nixos.org/nar/0dcr7v0fd4bg3khrs514zim38d4cqqjb89mh4kxsa5mwq5wlz7z5.nar.xz'...
downloading 'https://cache.nixos.org/nar/0igcqqdn2cglm1nl4m22c01r13l0n50ng9mikmyp0iyrzr8ipidl.nar.xz'...
downloading 'https://cache.nixos.org/nar/1aic4rx6im6d6riya6z6xd3m9ycv2w4k6zdlizjb8rhv78db8zqm.nar.xz'...
downloading 'https://cache.nixos.org/nar/13kl9hf9f51fgh9f1d5irfwhrkg58yk92wlkm9mm13wqj8dhgqk2.nar.xz'...
downloading 'https://cache.nixos.org/nar/05d2d4bqcc69cxs8wqbgz6bsqb8mx7c5f3x0xcs9cqavpj3y8dk8.nar.xz'...
error: 1 dependencies of derivation '/nix/store/rlwp7c0q3wmjs44mzq24razp92kbh2gc-etc.drv' failed to build
error: 1 dependencies of derivation '/nix/store/k1wdbjh5rs38vgv2dzvf7fm44a4wnl4h-nixos-system-razer-25.05.811135.7e297ddff44a.drv' failed to build

My nixos config:

# Edit this configuration file to define what should be installed on
# your system.  Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).

{ config, pkgs, ... }:
/*
# unstable.<package> channel option
let
  unstable = import
    (builtins.fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz)
    # reuse the current configuration
    { config = config.nixpkgs.config; };
in
*/

let
  unstable = import <nixos-unstable> { };
in




{
# Speed up builds with remote builds
	# nix.buildMachines = [{
	# 	hostName = "laptop";
	# 	system = "x86_64-linux";
	# 	protocol = "ssh";
	#
	# 	#maxJobs = 1;
	# 	#speedFactor = 2;
	# 	#supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
	# 	#mandatoryFeatures = [ ];
	# }];
	# nix.distributedBuilds = true;
	# # optional, useful when the builder has a faster internet connection than yours
	# #nix.extraOptions = ''
	# #	builders-use-substitutes = true
	# #'';


	nix.settings.experimental-features = [ "nix-command" "flakes" ];



	imports =
		[ # Include the results of the hardware scan.
		./hardware-configuration.nix
		<musnix>
		];

# Bootloader.
	boot.loader.systemd-boot.enable = true;
	boot.loader.efi.canTouchEfiVariables = true;

	boot.initrd.luks.devices."luks-38732dd0-b562-475f-83db-9a2f8a0b0775".device = "/dev/disk/by-uuid/38732dd0-b562-475f-83db-9a2f8a0b0775";



	networking.hostName = "razer"; # Define your hostname.
# networking.wireless.enable = true;  # Enables wireless support via wpa_supplicant.






# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";

# Enable networking
		networking.networkmanager.enable = true;

	networking.nameservers = [ "1.1.1.1#one.one.one.one" "1.0.0.1#one.one.one.one" ];

	services.resolved = {
		enable = true;
		dnssec = "true";
		domains = [ "~." ];
		fallbackDns = [ "1.1.1.1#one.one.one.one" "1.0.0.1#one.one.one.one" ];
		extraConfig = ''
			DNSOverTLS=yes
			'';
	};


# Set your time zone.
	time.timeZone = "America/New_York";

# Select internationalisation properties.
	i18n.defaultLocale = "en_US.UTF-8";

	i18n.extraLocaleSettings = {
		LC_ADDRESS = "en_US.UTF-8";
		LC_IDENTIFICATION = "en_US.UTF-8";
		LC_MEASUREMENT = "en_US.UTF-8";
		LC_MONETARY = "en_US.UTF-8";
		LC_NAME = "en_US.UTF-8";
		LC_NUMERIC = "en_US.UTF-8";
		LC_PAPER = "en_US.UTF-8";
		LC_TELEPHONE = "en_US.UTF-8";
		LC_TIME = "C.UTF-8";
	};

# Enable the X11 windowing system.
	services.xserver.enable = true;

# Enable the GNOME Desktop Environment.
	services.xserver.displayManager.gdm.enable = true;
	services.xserver.desktopManager.gnome.enable = true;


environment.pathsToLink = [ "/libexec" ];

#services.xserver = {
#desktopManager.xterm.enable = false;
#displayManager.defaultSession = "none+i3";

/*
windowManager.i3 = {
	enable = true;
	extraPackages = with pkgs; [
		dmenu
		i3status
		i3lock
		i3blocks
	];
};
};o
*/
#};


# Remove unwanted gnome packages
	environment.gnome.excludePackages = [ pkgs.gnome-connections pkgs.cheese pkgs.gnome-photos pkgs.gnome-music pkgs.gedit pkgs.totem pkgs.gnome-tour pkgs.xterm pkgs.epiphany];

# Configure keymap in X11
	services.xserver.xkb = {
		layout = "us";
		variant = "dvorak-alt-intl";
	};

# Configure console keymap
	console.keyMap = "dvorak";

# Enable CUPS to print documents.
	services.printing.enable = true;

# Enable sound with pipewire.
	services.pulseaudio.enable = false;
	security.rtkit.enable = true;
	security.sudo.wheelNeedsPassword = false;
	services.pipewire = {
		enable = true;
		alsa.enable = true;
		alsa.support32Bit = true;
		pulse.enable = true;
# If you want to use JACK applications, uncomment this
jack.enable = true;

wireplumber.enable = true;
	};

# Set proper audio plugin paths
musnix.enable = true;

# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;


# Define a user account. Don't forget to set a password with ‘passwd’.
	users.users.test = {
		isNormalUser = true;
		packages = with pkgs; [
			terminator
			neovim
		];
	};

	users.users.lcoogan = {
		isNormalUser = true;
		description = "Leo Coogan";
		extraGroups = [ "networkmanager" "wheel" "audio" "scanner" "lp" ];
		packages = with pkgs; [
		zrythm
		#shadered #broked

		#helio-workstation
		sequoia-chameleon-gnupg
		sequoia-sq
		ghc
		haskellPackages.hsc3
		ossia-score

		gajim
		minicom
		#godot
		fractal
		#orca-c
		transmission_4-gtk
		nix-index
		glslviewer
		progress
		rofi
		tk
		#zoom-us
		tcl
		blender
		puredata
		#steam
		xorg.xkill
		#bottles
		vulkan-tools
		#yabridge
		#yabridgectl
#reaper
#bitwig-studio
#renoise

		#gnome.gnome-boxes
		easytag
		qjackctl
		carla
		#distrho-ports
		stochas

		# standalone synths
		helm
		surge
		zynaddsubfx
		vital
		dexed

		glxinfo
		graphviz
		#aegisub
		#kdenlive
		xclip
usbmuxd
ifuse
libimobiledevice

		show-midi
		ungoogled-chromium
		nixpkgs-review
		instaloader
		gallery-dl
		pb_cli
		steam-run
		nicotine-plus
		anki
		kdePackages.parley

		duf
		hydra-check
		tldr
		nix-tree
		terminator
		jpegoptim
		opusTools
		telegram-desktop
		eog

		#instaloader
		#gallery-dl

#chromium
#easyeffects
img2pdf
pipreqs
tenacity
zip




		virtualenv

		# Sound
		lmms
		#polyphone


		gnome-tweaks
		appimage-run
		#gnome.gnome-boxes
		#tenacity
		tmux
		nchat
		whatsapp-for-linux

		man-pages
		man-pages-posix
		
		killall
		asciinema
		unstable.novelwriter
			paperkey
			vlc
			ardour
			#librewolf
			#what's a minimal pdf engine for pandoc? https://pandoc.org/MANUAL.html#option--pdf-engine
			pandoc
			tea
			dos2unix
			clang
			groff
			pipx
			figlet
			kid3
			fdupes
			tor-browser-bundle-bin
			wineWowPackages.staging
			#winetricks
			poppler_utils
			#gst-plugins-good
			go
			hugo
			mullvad
			zathura
			
			gmic
			#gimp
			#gmic-qt
			gimp3-with-plugins

			#chuck
			unstable.hledger
			hledger-web
			unstable.hledger-iadd
			firefox
			librewolf
			vdhcoapp
			thunderbird
#neomutt
			pass
passExtensions.pass-update
passExtensions.pass-otp
passExtensions.pass-genphrase
passExtensions.pass-file
passExtensions.pass-audit

			#qbittorrent	# has a CVE
			btop
			lf
			alacritty
			libreoffice
			syncthing
			wl-clipboard
			hamster
			supercollider-with-sc3-plugins
			tilix
			yt-dlp
			mpv
			
			# RE
			cutter
			cutterPlugins.rz-ghidra
			hexedit
			gdb
			rizin
			#ghidra

			hunspell
			hunspellDicts.en_US

			sshfs-fuse
			imv
			speedtest-cli
			sourceHighlight
			imagemagick
			file
			neofetch
			pinentry-gnome3
			wget
			aria2

			#ffmpeg-full
			#x265
			ffmpeg
			mediainfo
			
			trash-cli
			gcc
			git
			lazygit
			#vimPlugins.lazygit-nvim
	#yt-dlp
			pastebinit
			#python3.pkgs.miasm #doesn't work
			python3
			plocate
			cmake
			gnumake
			unzip
	#wine64
			unrar-wrapper
			pavucontrol
			quodlibet-full

		];
	};

# Enable automatic login for the user.
	services.displayManager.autoLogin.enable = true;
	services.displayManager.autoLogin.user = "lcoogan";


# Workaround for GNOME autologin: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229
	systemd.services."getty@tty1".enable = false;
	systemd.services."autovt@tty1".enable = false;

# For dumb terminal	
	#systemd.services."serial-getty@ttyUSB0".enable = true;  #for some reason breaks graphical input.

# Allow unfree
	nixpkgs.config.allowUnfree = true;
	nixpkgs.config.cudaSupport = true;

# List packages installed in system profile. To search, run:
# $ nix search wget


	environment.systemPackages = with pkgs; [
		#helvum
		#easyeffects
	];


	programs.neovim = {
		enable = true;
		defaultEditor = true;

		viAlias = true;
		vimAlias = true;

	/*	extraPackages = with pkgs.vimPlugins; [
			scnvim
		]; */
	};


	programs.zsh.enable = true;
	users.defaultUserShell = pkgs.zsh;
	environment.binsh = "${pkgs.dash}/bin/dash";

	# manpages
	documentation.dev.enable = true;
	documentation.man.generateCaches = true; #automatically rebuild the mandb cache

# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
	programs.gnupg.agent = {
		enable = true;
		enableSSHSupport = true;
		#pinentryFlavor = "gnome3";
	};
	  services.pcscd.enable = true;

# List services that you want to enable:
#services.resilio.enable = true;

#services.flatpak.enable = true;

#  systemd.services.flatpak-repo = {
#    wantedBy = [ "multi-user.target" ];
#    path = [ pkgs.flatpak ];
#    script = ''
#      flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
#    '';
#  };


# Enable the OpenSSH daemon.
	services.openssh.enable = true;

	services.locate.enable = true;

	services.mullvad-vpn.enable = false;

# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;

# 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
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
	system.stateVersion = "23.05"; # Did you read the comment?





    nixpkgs.overlays = [
        (self: super: {
            lmms = super.lmms.overrideAttrs {
                version = "1.3.0-alpha.1";
                src = pkgs.fetchFromGitHub {
                    owner = "LMMS";
                    repo = "lmms";
                    rev = "bda042e1eb59e4c7508faa072051c50c2e12894d";
                    sha256 = "sha256-EGJcTzPUkIqURHKjX6dTRkeRTqwHM8eG74lYVILgSAs";
                    fetchSubmodules = true;
                };
                patches = [];
            };
        })
    ];



# Static Web Server
#services.static-web-server = {
#	enable = true;
#	root = "/home/lcoogan/Public";
#};


nix.gc = {
	automatic = true;
	dates = "weekly";
	options = "--delete-older-than 30d";
};






# NVIDIA drivers
# Note: because NVIDIA is evil, this will break graphical output on the builtin monitor

# Enable OpenGL
	hardware.opengl = {
		enable = true;
		#driSupport = true;
		driSupport32Bit = true;
		extraPackages = with pkgs; [
			vulkan-loader
			vulkan-validation-layers
			nvidia-vaapi-driver
			libvdpau
		];
		extraPackages32 = with pkgs.pkgsi686Linux; [
			vulkan-loader
		];
	};
/*
evaluation warning: The option `hardware.opengl.extraPackages32' defined in `/etc/nixos/configuration.nix' has been renamed to `hardware.graphics.extraPackages32'.
evaluation warning: The option `hardware.opengl.extraPackages' defined in `/etc/nixos/configuration.nix' has been renamed to `hardware.graphics.extraPackages'.
evaluation warning: The option `hardware.opengl.driSupport32Bit' defined in `/etc/nixos/configuration.nix' has been renamed to `hardware.graphics.enable32Bit'.
evaluation warning: The option `hardware.opengl.enable' defined in `/etc/nixos/configuration.nix' has been renamed to `hardware.graphics.enable'.
*/




# Load nvidia driver for Xorg and Wayland
	services.xserver.videoDrivers = ["nvidia"]; # or "nvidiaLegacy470 etc.

systemd.services.nvidia-control-devices = {
	wantedBy = [ "multi-user.target" ];
	serviceConfig.ExecStart = "${pkgs.linuxPackages.nvidia_x11.bin}/bin/nvidia-smi";
};

hardware.graphics.enable = true;

		hardware.nvidia = {

# Modesetting is required.
			modesetting.enable = true;

# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
# Enable this if you have graphical corruption issues or application crashes after waking
# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead 
# of just the bare essentials.
			powerManagement.enable = false;

# Fine-grained power management. Turns off GPU when not in use.
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
			powerManagement.finegrained = false;

# Use the NVidia open source kernel module (not to be confused with the
# independent third-party "nouveau" open source driver).
# Support is limited to the Turing and later architectures. Full list of 
# supported GPUs is at: 
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus 
# Only available from driver 515.43.04+
# Currently alpha-quality/buggy, so false is currently the recommended setting.
			open = false;

# Enable the Nvidia settings menu,
# accessible via `nvidia-settings`.
			nvidiaSettings = true;

# Optionally, you may need to select the appropriate driver version for your specific GPU.
package = config.boot.kernelPackages.nvidiaPackages.stable;

		};

		


	hardware.sane.enable = true;



#programs.virt-manager.enable = true;
users.groups.libvirtd.members = ["lcoogan"];
virtualisation.libvirtd.enable = true;
virtualisation.spiceUSBRedirection.enable = true;


}

No idea what to do. Any help appreciated.