1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-09-21 13:57:31 +02:00

unison: add package option

So that one can use the lighter headless version of Unison.
This commit is contained in:
pacien 2023-10-08 16:41:24 +02:00 committed by Mikilio
parent bac8127ea8
commit ced844c21e
No known key found for this signature in database
GPG key ID: 5B2F1A890CF33F3F

View file

@ -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}
'';