patate: nix: diable auto-optimise-store
[julm/julm-nix.git] / hosts / patate / ilico.nix
index 67043984f5cf2f34a1f5bed5c37bbe5f1066980f..ce2ae236c43cf75e474ad2bfb67aba65db6122af 100644 (file)
@@ -1,14 +1,33 @@
-{ config, pkgs, lib, ... }:
+{ config, pkgs, ... }:
 {
-services.davfs2.enable = true;
-fileSystems."/home/sevy/mnt/ilico/severine" = {
-  device = "https://nuage.ilico.org/remote.php/dav/files/severine/";
-  fsType = "davfs";
-  options =
-    let conf = pkgs.writeText "davfs2.conf" ''
-      backup_dir /home/sevy/Documents/EnTransfert/ilico/severine
-      cache_dir /home/sevy/.cache/davfs2/ilico/severine
-    ''; in
-    [ "conf=${conf}" "user" "noexec" "nosuid" "noauto" ]; # "x-systemd.automount"
-};
+  services.davfs2.enable = true;
+  users.users.sevy.extraGroups = [
+    config.services.davfs2.davGroup
+  ];
+  fileSystems."/home/sevy/mnt/ilico/severine" = {
+    device = "https://nuage.ilico.org/remote.php/dav/files/severine/";
+    fsType = "davfs";
+    options =
+      let
+        conf = pkgs.writeText "davfs2.conf" ''
+          backup_dir /home/sevy/Documents/EnTransfert/ilico/severine
+          cache_dir /home/sevy/.cache/davfs2/ilico/severine
+          secrets /home/sevy/.davfs2/secrets
+        '';
+      in
+      [
+        "conf=${conf}"
+        "user"
+        "noexec"
+        "nosuid"
+        "noauto"
+        "nofail"
+        "_netdev"
+        "reconnect"
+        "x-systemd.automount"
+        "x-systemd.device-timeout=1m"
+        "x-systemd.idle-timeout=1m"
+        "x-systemd.mount-timeout=10s"
+      ];
+  };
 }