1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-03-07 01:07:00 +00:00

syncthing: use package options

Currently, all references are hardcoded even though we offer package
options. Update to use package options.
This commit is contained in:
Austin Horstman 2025-02-13 10:16:42 -06:00
parent 22b418c13f
commit 20fac9bbdf

View file

@ -38,13 +38,13 @@ let
device) folder.devices; device) folder.devices;
}) (filterAttrs (_: folder: folder.enable) cfg.settings.folders); }) (filterAttrs (_: folder: folder.enable) cfg.settings.folders);
jq = "${pkgs.jq}/bin/jq"; jq = lib.getExe pkgs.jq;
sleep = "${pkgs.coreutils}/bin/sleep"; sleep = lib.getExe' pkgs.coreutils "sleep";
printf = "${pkgs.coreutils}/bin/printf"; printf = lib.getExe' pkgs.coreutils "printf";
cat = "${pkgs.coreutils}/bin/cat"; cat = lib.getExe' pkgs.coreutils "cat";
curl = "${pkgs.curl}/bin/curl"; curl = lib.getExe pkgs.curl;
install = "${pkgs.coreutils}/bin/install"; install = lib.getExe' pkgs.coreutils "install";
syncthing = "${pkgs.syncthing}/bin/syncthing"; syncthing = lib.getExe cfg.package;
updateConfig = pkgs.writers.writeBash "merge-syncthing-config" ('' updateConfig = pkgs.writers.writeBash "merge-syncthing-config" (''
set -efu set -efu
@ -606,7 +606,7 @@ in {
config = mkMerge [ config = mkMerge [
(mkIf cfg.enable { (mkIf cfg.enable {
home.packages = [ (getOutput "man" pkgs.syncthing) ]; home.packages = [ (getOutput "man" cfg.package) ];
systemd.user.services = { systemd.user.services = {
syncthing = { syncthing = {