From 6dfbdc977e059f30376e23f70f67d9726d5c91b8 Mon Sep 17 00:00:00 2001 From: pacien Date: Sun, 8 Oct 2023 16:41:24 +0200 Subject: [PATCH] unison: add package option So that one can use the lighter headless version of Unison. --- modules/services/unison.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/services/unison.nix b/modules/services/unison.nix index 7f8a47a6..d3f0a8e6 100644 --- a/modules/services/unison.nix +++ b/modules/services/unison.nix @@ -76,6 +76,10 @@ in { options.services.unison = { enable = mkEnableOption "Unison synchronisation"; + package = mkPackageOption pkgs "unison" { + example = "pkgs.unison.override { enableX11 = false; }"; + }; + pairs = mkOption { type = with types; attrsOf (submodule pairOptions); default = { }; @@ -117,7 +121,7 @@ in { Environment = [ "UNISON='${toString pairCfg.stateDirectory}'" ]; ExecStart = '' - ${pkgs.unison}/bin/unison \ + ${cfg.package}/bin/unison \ ${serialiseArgs pairCfg.commandOptions} \ ${strings.concatMapStringsSep " " escapeShellArg pairCfg.roots} '';