Commit 7e1253ff1d21

Vincent Demeester <vincent@sbr.pm>
2018-10-30 18:33:32
wakasu: enable nvidia optimus ๐Ÿ˜“
โ€ฆ and update some stuff (like firewall, podman, โ€ฆ) Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent cd31b02
Changed files (1)
machine
machine/wakasu.nix
@@ -24,18 +24,33 @@
   
   hardware.bluetooth.enable = true;
   hardware.bluetooth.powerOnBoot = true;
-
   hardware.trackpoint.enable = false;
 
-  networking.firewall.allowedTCPPorts = [ 5900 ];
+  networking.firewall.allowedUDPPortRanges = [ { from = 6001; to = 6101; } ];
+  networking.firewall.allowedTCPPorts = [ 7946 9000 5000 ];
 
   time.timeZone = "Europe/Paris";
 
-  services.xserver.displayManager.slim.theme = pkgs.fetchurl {
-    url = "https://github.com/vdemeester/slim-themes/raw/master/docker-key-theme-0.1.tar.xz";
-    sha256 = "127893l1nzqya0g68k8841g5lm3hlnx7b3b3h06axvplc54a1jd8";
+  services = {
+    xserver = {
+      videoDrivers = [ "nvidia" ];
+      dpi = 96;
+      displayManager.slim.theme = pkgs.fetchurl {
+        url = "https://github.com/vdemeester/slim-themes/raw/master/docker-key-theme-0.1.tar.xz";
+        sha256 = "127893l1nzqya0g68k8841g5lm3hlnx7b3b3h06axvplc54a1jd8";
+      };
+    };
   };
-   services.wireguard = with import ../assets/machines.nix; {
+  hardware.nvidia.optimus_prime.enable = true;
+  hardware.nvidia.optimus_prime.nvidiaBusId = "PCI:1:0:0";
+  hardware.nvidia.optimus_prime.intelBusId = "PCI:0:2:0";
+
+  # Move elsewhere
+  programs.podman = {
+    enable = true;
+  };
+
+  services.wireguard = with import ../assets/machines.nix; {
     enable = true;
     ips = [ "${wireguard.ips.wakasu}/24" ];
     endpoint = wg.endpointIP;