yandex-disk service: add exclude-dirs option

Changed files
+10 -1
nixos
modules
services
network-filesystems
+10 -1
nixos/modules/services/network-filesystems/yandex-disk.nix
···
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.
+
'';
+
};
+
};
};
···
-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}'
'';
};