From f0ad87bdd7adeccb8a73ebfb310d5a566ef07a8c Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Fri, 4 Oct 2024 15:11:13 +0200 Subject: [PATCH] nixos/resilio: add package option --- nixos/modules/services/networking/resilio.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nixos/modules/services/networking/resilio.nix b/nixos/modules/services/networking/resilio.nix index 02773d78b132..f9c682f168b7 100644 --- a/nixos/modules/services/networking/resilio.nix +++ b/nixos/modules/services/networking/resilio.nix @@ -5,8 +5,6 @@ with lib; let cfg = config.services.resilio; - resilioSync = pkgs.resilio-sync; - sharedFoldersRecord = map (entry: { dir = entry.directory; @@ -83,6 +81,8 @@ in ''; }; + package = mkPackageOption pkgs "resilio-sync" { }; + deviceName = mkOption { type = types.str; example = "Voltron"; @@ -285,7 +285,7 @@ in RuntimeDirectory = "rslsync"; ExecStartPre = "${createConfig}/bin/create-resilio-config"; ExecStart = '' - ${resilioSync}/bin/rslsync --nodaemon --config ${runConfigPath} + ${lib.getExe cfg.package} --nodaemon --config ${runConfigPath} ''; }; };