opengl: enable for using through ssh
authorJulien Moutinho <julm@sourcephile.fr>
Thu, 8 Apr 2021 05:04:12 +0000 (07:04 +0200)
committerJulien Moutinho <julm@sourcephile.fr>
Thu, 8 Apr 2021 05:04:12 +0000 (07:04 +0200)
hosts/losurdo/hardware.nix
hosts/losurdo/networking/ssh.nix
hosts/losurdo/system.nix

index 751571d9c9db41bcbe8f5af7edf4cec0e0090dc5..69fae97d03e963d308d628b99ed4138112c11161 100644 (file)
@@ -10,6 +10,15 @@ imports = [
 # Manually generated with : head -c4 /dev/urandom | od -A none -t x4 | cut -d ' ' -f 2
 networking.hostId = "e18f71a6";
 
+hardware.opengl = {
+  extraPackages = [
+    pkgs.intel-media-driver # LIBVA_DRIVER_NAME=iHD
+    pkgs.vaapiIntel         # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
+    pkgs.vaapiVdpau
+    pkgs.libvdpau-va-gl
+  ];
+};
+
 boot.loader.grub.devices = [
   #"/dev/disk/by-id/nvme-Samsung_SSD_970_EVO_Plus_250GB_S4EUNJ0N211426T"
   #"/dev/disk/by-id/usb-Generic-_Multi-Card_20071114173400000-0:0"
index 7d657728c9ce24c9cd5e148c02b2c40294e718a1..8e48f0de553ba87fdf66d2589be5c133202b027a 100644 (file)
@@ -27,6 +27,9 @@ boot.initrd.network.ssh = {
   authorizedKeys = users.root.openssh.authorizedKeys.keys;
   hostKeys = [ "/root/initrd/ssh.key" ];
 };
+services.openssh = {
+  forwardX11 = true;
+};
 programs.ssh = {
   extraConfig = ''
     Compression = yes
index b34136177d802841473abc7b62453952aaa344ed..6d6a478cdefed758e2ab71c28b4b11d3de8a0cd7 100644 (file)
@@ -16,6 +16,8 @@ nix.gc.options = "--delete-older-than 7d";
 # and let mosh work smoothly.
 services.logind.killUserProcesses = false;
 
+hardware.opengl.enable = true;
+
 documentation.nixos = {
   enable = false; # NOTE: useless on a server, and CPU intensive.
 };