summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorAlex Ivanov <gnidorah@users.noreply.github.com>2016-11-12 12:36:33 +0300
committerAlex Ivanov <gnidorah@users.noreply.github.com>2016-11-12 12:36:33 +0300
commitccf8566bdd5784d771ebf46b0a4be514b0204ae5 (patch)
tree89ed910218f2453714f0fdc32f073eab8595f808 /nixos
parent5f8aa15e846e14bdf034caaee908c321277aad22 (diff)
downloadnixpkgs-ccf8566bdd5784d771ebf46b0a4be514b0204ae5.tar
nixpkgs-ccf8566bdd5784d771ebf46b0a4be514b0204ae5.tar.gz
nixpkgs-ccf8566bdd5784d771ebf46b0a4be514b0204ae5.tar.bz2
nixpkgs-ccf8566bdd5784d771ebf46b0a4be514b0204ae5.tar.lz
nixpkgs-ccf8566bdd5784d771ebf46b0a4be514b0204ae5.tar.xz
nixpkgs-ccf8566bdd5784d771ebf46b0a4be514b0204ae5.tar.zst
nixpkgs-ccf8566bdd5784d771ebf46b0a4be514b0204ae5.zip
yandex-disk service: add exclude-dirs option
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/network-filesystems/yandex-disk.nix11
1 files changed, 10 insertions, 1 deletions
diff --git a/nixos/modules/services/network-filesystems/yandex-disk.nix b/nixos/modules/services/network-filesystems/yandex-disk.nix
index d9e35e3953f..4de20664133 100644
--- a/nixos/modules/services/network-filesystems/yandex-disk.nix
+++ b/nixos/modules/services/network-filesystems/yandex-disk.nix
@@ -55,6 +55,15 @@ in
         description = "The directory to use for Yandex.Disk storage";
       };
 
+      excludes = mkOption {
+        default = "";
+        type = types.string;
+        example = "data,backup";
+        description = ''
+          Comma-separated list of directories which are excluded from synchronization.
+        '';
+      };
+
     };
 
   };
@@ -94,7 +103,7 @@ in
           -c '${pkgs.yandex-disk}/bin/yandex-disk token -p ${cfg.password} ${cfg.username} ${dir}/token'
 
         ${pkgs.su}/bin/su -s ${pkgs.stdenv.shell} ${u} \
-          -c '${pkgs.yandex-disk}/bin/yandex-disk start --no-daemon -a ${dir}/token -d ${cfg.directory}'
+          -c '${pkgs.yandex-disk}/bin/yandex-disk start --no-daemon -a ${dir}/token -d ${cfg.directory} --exclude-dirs=${cfg.excludes}'
       '';
 
     };