nixos/modules/resilio/default.nix
Jake Hillion d8191abd1f
Some checks are pending
continuous-integration/drone/pr Build is running
continuous-integration/drone/push Build is passing
resilio: reset to upstream
2022-12-04 15:50:52 +00:00

29 lines
832 B
Nix

{ pkgs, lib, config, nixpkgs-unstable, ... }:
{
imports = [ "${nixpkgs-unstable}/nixos/modules/services/networking/resilio.nix" ];
disabledModules = [ "services/networking/resilio.nix" ];
options.resilioFolders = lib.mkOption {
type = with lib.types; uniq (listOf attrs);
default = [ ];
};
config.users.users.jake.extraGroups = [ "rslsync" ];
config.services.resilio.sharedFolders =
let
mkFolder = name: secretFile: {
directory = "${config.services.resilio.directoryRoot}/${name}";
secretFile = "${secretFile}";
knownHosts = [ ];
searchLAN = true;
useDHT = true;
useRelayServer = true;
useSyncTrash = false;
useTracker = true;
};
in
builtins.map (folder: mkFolder folder.name folder.secretFile) config.resilioFolders;
}