summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/share/omo-client.nix
blob: 4ad32bdd61758fd7b514558ab6e19f5a379fae9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{ config, lib, pkgs, ... }:

let
  automount_opts =
  [ "x-systemd.automount"
    "noauto" "x-systemd.idle-timeout=600"
    "x-systemd.device-timeout=5s"
    "x-systemd.mount-timeout=5s"
  ];
  host = "omo.lan"; #TODO
  path = "/media/omo/photos";
in {
  systemd.tmpfiles.rules = [
    "d ${path} root root - -"
  ];
  fileSystems."${path}" = {
      device = "//${host}/photos";
      fsType = "cifs";
      options = automount_opts ++
      [ "credentials=/var/src/secrets/omo-client.smb"
        "file_mode=0775"
        "dir_mode=0775"
        "uid=9001"
        "vers=3"
      ];
  };

}