Skip to content

Commit e8e2560

Browse files
2025_03_31 nvidia
1 parent e0bbe10 commit e8e2560

File tree

7 files changed

+60
-36
lines changed

7 files changed

+60
-36
lines changed

laptops/t/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ endif
1818
rebuild:
1919
sudo nixos-rebuild switch --flake .
2020

21+
impure:
22+
sudo nixos-rebuild switch --impure --flake .
23+
2124
rebuild_trace:
2225
sudo nixos-rebuild switch --show-trace --flake .
2326

laptops/t/configuration.nix

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@
5555
loader.efi.canTouchEfiVariables = true;
5656

5757
# https://nixos.wiki/wiki/Linux_kernel
58-
kernelPackages = pkgs.linuxPackages; # need to run this old kernel to allow nvidia driver to compile :(
58+
#kernelPackages = pkgs.linuxPackages; # need to run this old kernel to allow nvidia driver to compile :(
59+
kernelPackages = pkgs.unstable.linuxPackages;
5960
#boot.kernelPackages = pkgs.linuxPackages_latest;
6061
#boot.kernelPackages = pkgs.linuxPackages_rpi4
6162

@@ -175,7 +176,7 @@
175176
systemd.services.modem-manager.enable = false;
176177
systemd.services."dbus-org.freedesktop.ModemManager1".enable = false;
177178

178-
services.clickhouse.enable = true;
179+
services.clickhouse.enable = false;
179180

180181
# environment.variables defined in hardware-graphics.nix
181182
environment.sessionVariables = {
@@ -209,6 +210,12 @@
209210
};
210211

211212
# # https://wiki.hyprland.org/Nix/Hyprland-on-NixOS/
213+
programs.hyprland = {
214+
enable = true;
215+
# Nvidia patches are no longer needed
216+
#nvidiaPatches = true;
217+
xwayland.enable = true;
218+
};
212219
# programs.hyprland = {
213220
# enable = true;
214221
# # set the flake package
@@ -278,5 +285,7 @@
278285
# services.qemuGuest.enable = true;
279286
# services.spice-vdagentd.enable = true;
280287

288+
nixpkgs.config.allowUnfree = true;
289+
281290
# https://wiki.nixos.org/wiki/Laptop
282291
}

laptops/t/flake.lock

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

laptops/t/flake.nix

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,14 @@
3939
config = { allowUnfree = true; };
4040
};
4141
# https://nixos.wiki/wiki/Flakes#Importing_packages_from_multiple_channels
42+
# overlay-unstable = final: prev: {
43+
# unstable = nixpkgs-unstable.legacyPackages.${prev.system};
44+
# };
4245
overlay-unstable = final: prev: {
43-
unstable = nixpkgs-unstable.legacyPackages.${prev.system};
46+
unstable = import nixpkgs-unstable {
47+
inherit system;
48+
config = { allowUnfree = true; };
49+
};
4450
};
4551
lib = nixpkgs.lib;
4652
in {

laptops/t/hardware-graphics.nix

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@
6363
#package = config.boot.kernelPackages.nvidiaPackages.beta; # <---------- was using this
6464
#package = config.boot.kernelPackages.nvidiaPackages.production;
6565
# https://nixos.wiki/wiki/Nvidia#Determining_the_Correct_Driver_Version
66-
package = pkgs.linuxPackages.nvidia_x11;
66+
# https://github.com/NixOS/nixpkgs/blob/master/pkgs/by-name/nv/nvidia-modprobe/package.nix
67+
#package = pkgs.linuxPackages.nvidia_x11;
68+
package = pkgs.unstable.linuxPackages.nvidia_x11;
6769
};
6870

6971
# https://theo.is-a.dev/blog/post/hyprland-adventure/
@@ -154,4 +156,8 @@
154156
# # #sync.enable = true;
155157
# # enableOffloadCmd = true;
156158
# #};
157-
# };
159+
# };
160+
161+
# [LOG] GPU information:
162+
# 00:02.0 VGA compatible controller [0300]: Intel Corporation CometLake-H GT2 [UHD Graphics] [8086:9bc4] (rev 05) (prog-if 00 [VGA controller])
163+
# 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation TU117GLM [Quadro T2000 Mobile / Max-Q] [10de:1fb8] (rev a1) (prog-if 00 [VGA controller])

laptops/t/home.nix

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,16 +133,17 @@
133133
# thunderbird
134134
#go_1_23
135135
unstable.go
136-
gopls
137-
golint
136+
unstable.gopls
137+
unstable.golint
138138
golangci-lint
139-
golangci-lint-langserver
140-
trunk-io
139+
unstable.golangci-lint-langserver
140+
# trunk is unfree, and i can't work out how to enable unfree
141+
#trunk-io
141142
# https://github.com/go-delve/delve
142-
delve
143+
unstable.delve
143144
# https://github.com/aarzilli/gdlv
144145
gdlv
145-
buf
146+
unstable.buf
146147
protobuf_27
147148
grpcurl
148149
# https://github.com/go-gorm/gen

laptops/t/systemPackages.nix

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
usbutils
2323
pciutils
2424
virt-manager
25-
cudatoolkit
2625
pkgs.gnomeExtensions.appindicator
2726
iw
2827
wirelesstools
@@ -31,13 +30,13 @@
3130
lldpd
3231
#snmp seems to be needed by lldpd
3332
net-snmp
34-
neofetch
33+
unstable.neofetch
3534

3635
# https://wiki.nixos.org/wiki/Flameshot
3736
(flameshot.override { enableWlrSupport = true; })
3837

3938
# hyprland
40-
hyprland
39+
unstable.hyprland
4140
swww # for wallpapers
4241
xdg-desktop-portal-gtk
4342
xdg-desktop-portal-hyprland
@@ -50,16 +49,16 @@
5049

5150
#
5251
#nvidia
53-
vdpauinfo # sudo vainfo
54-
libva-utils # sudo vainfo
52+
unstable.vdpauinfo # sudo vainfo
53+
unstable.libva-utils # sudo vainfo
5554
# https://discourse.nixos.org/t/nvidia-open-breaks-hardware-acceleration/58770/2
5655
#
57-
ffmpeg-full
56+
unstable.ffmpeg-full
5857
#
5958
# https://nixos.wiki/wiki/CUDA
60-
cudatoolkit
61-
linuxPackages.nvidia_x11
62-
libGLU
63-
libGL
59+
unstable.cudatoolkit
60+
unstable.linuxPackages.nvidia_x11
61+
unstable.libGLU
62+
unstable.libGL
6463
];
6564
}

0 commit comments

Comments
 (0)