mirror of
https://github.com/nix-community/home-manager
synced 2024-11-23 11:39:46 +01:00
unison: add package option
So that one can use the lighter headless version of Unison.
This commit is contained in:
parent
3c1d8758ac
commit
6dfbdc977e
1 changed files with 5 additions and 1 deletions
|
@ -76,6 +76,10 @@ in {
|
||||||
options.services.unison = {
|
options.services.unison = {
|
||||||
enable = mkEnableOption "Unison synchronisation";
|
enable = mkEnableOption "Unison synchronisation";
|
||||||
|
|
||||||
|
package = mkPackageOption pkgs "unison" {
|
||||||
|
example = "pkgs.unison.override { enableX11 = false; }";
|
||||||
|
};
|
||||||
|
|
||||||
pairs = mkOption {
|
pairs = mkOption {
|
||||||
type = with types; attrsOf (submodule pairOptions);
|
type = with types; attrsOf (submodule pairOptions);
|
||||||
default = { };
|
default = { };
|
||||||
|
@ -117,7 +121,7 @@ in {
|
||||||
|
|
||||||
Environment = [ "UNISON='${toString pairCfg.stateDirectory}'" ];
|
Environment = [ "UNISON='${toString pairCfg.stateDirectory}'" ];
|
||||||
ExecStart = ''
|
ExecStart = ''
|
||||||
${pkgs.unison}/bin/unison \
|
${cfg.package}/bin/unison \
|
||||||
${serialiseArgs pairCfg.commandOptions} \
|
${serialiseArgs pairCfg.commandOptions} \
|
||||||
${strings.concatMapStringsSep " " escapeShellArg pairCfg.roots}
|
${strings.concatMapStringsSep " " escapeShellArg pairCfg.roots}
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Reference in a new issue