nixos/resilio: add package option
This commit is contained in:
@@ -5,8 +5,6 @@ with lib;
|
|||||||
let
|
let
|
||||||
cfg = config.services.resilio;
|
cfg = config.services.resilio;
|
||||||
|
|
||||||
resilioSync = pkgs.resilio-sync;
|
|
||||||
|
|
||||||
sharedFoldersRecord = map (entry: {
|
sharedFoldersRecord = map (entry: {
|
||||||
dir = entry.directory;
|
dir = entry.directory;
|
||||||
|
|
||||||
@@ -83,6 +81,8 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
package = mkPackageOption pkgs "resilio-sync" { };
|
||||||
|
|
||||||
deviceName = mkOption {
|
deviceName = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
example = "Voltron";
|
example = "Voltron";
|
||||||
@@ -285,7 +285,7 @@ in
|
|||||||
RuntimeDirectory = "rslsync";
|
RuntimeDirectory = "rslsync";
|
||||||
ExecStartPre = "${createConfig}/bin/create-resilio-config";
|
ExecStartPre = "${createConfig}/bin/create-resilio-config";
|
||||||
ExecStart = ''
|
ExecStart = ''
|
||||||
${resilioSync}/bin/rslsync --nodaemon --config ${runConfigPath}
|
${lib.getExe cfg.package} --nodaemon --config ${runConfigPath}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user