Commit 872f695db94b

Vincent Demeester <vincent@sbr.pm>
2018-10-07 15:05:07
hokkaido: try autofs setup…
… so far works with nfs, not fuse+sshfs Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent 14a18ba
Changed files (1)
machine/hokkaido.nix
@@ -21,6 +21,27 @@
   hardware.trackpoint.enable = false;
   time.timeZone = "Europe/Paris";
 
+  environment.systemPackages = with pkgs; [
+    nfs-utils
+    sshfs
+  ];
+
+  services.autofs = {
+    enable = true;
+    debug = true;
+    autoMaster = let
+      mapConfSsh = pkgs.writeText "auto.sshfs"  ''
+      shikoku.local -fstype=fuse,allow_other :sshfs\#shikoku.local\:
+      '';
+      mapConf = pkgs.writeText "auto"  ''
+      synodine -fstype=nfs,rw 192.168.12.19:/
+      '';
+    in ''
+      /auto file:${mapConf}
+      /auto/sshfs file:${mapConfSsh} uid=1000,gid=100,--timeout=30,--ghost
+    '';
+  };
+
   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";