From ccf8566bdd5784d771ebf46b0a4be514b0204ae5 Mon Sep 17 00:00:00 2001 From: Alex Ivanov Date: Sat, 12 Nov 2016 12:36:33 +0300 Subject: [PATCH] yandex-disk service: add exclude-dirs option --- .../services/network-filesystems/yandex-disk.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/network-filesystems/yandex-disk.nix b/nixos/modules/services/network-filesystems/yandex-disk.nix index d9e35e3953f2..4de206641331 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}' ''; };