Commit 210340dc6bb1

Vincent Demeester <vincent@sbr.pm>
2019-03-26 22:29:09
profile.ssh: add forwardX11 option
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent b8845f0
Changed files (2)
machine
modules
profiles
machine/wakasu.nix
@@ -44,7 +44,10 @@ with import ../assets/machines.nix; {
     desktop.autoLogin = true;
     nix-config.buildCores = 4;
     qemu-user = { arm = true; aarch64 = true; };
-    ssh.enable = true;
+    ssh = {
+      enable = true;
+      forwardX11 = true;
+    };
     virtualization = {
       enable = true;
       listenTCP = true;
modules/profiles/ssh.nix
@@ -12,6 +12,13 @@ in
         description = "Enable ssh profile";
         type = types.bool;
       };
+      forwardX11 = mkOption {
+        type = types.bool;
+        default = false;
+        description = ''
+          Whether to allow X11 connections to be forwarded.
+        '';
+      };
     };
   };
   config = mkIf cfg.enable {
@@ -19,6 +26,7 @@ in
       openssh = {
         enable = true;
         startWhenNeeded = false;
+        forwardX11 = cfg.forwardX11;
       };
     };
     programs.mosh.enable = true;