zrepl: add package option to module (#179189)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
parent
fb3672f9bd
commit
98ac43a1cf
1 changed files with 9 additions and 2 deletions
|
@ -13,6 +13,13 @@ in
|
|||
services.zrepl = {
|
||||
enable = mkEnableOption "zrepl";
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.zrepl;
|
||||
defaultText = literalExpression "pkgs.zrepl";
|
||||
description = "Which package to use for zrepl";
|
||||
};
|
||||
|
||||
settings = mkOption {
|
||||
default = { };
|
||||
description = ''
|
||||
|
@ -30,14 +37,14 @@ in
|
|||
### Implementation ###
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [ pkgs.zrepl ];
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
|
||||
# zrepl looks for its config in this location by default. This
|
||||
# allows the use of e.g. `zrepl signal wakeup <job>` without having
|
||||
# to specify the storepath of the config.
|
||||
environment.etc."zrepl/zrepl.yml".source = configFile;
|
||||
|
||||
systemd.packages = [ pkgs.zrepl ];
|
||||
systemd.packages = [ cfg.package ];
|
||||
|
||||
# Note that pkgs.zrepl copies and adapts the upstream systemd unit, and
|
||||
# the fields defined here only override certain fields from that unit.
|
||||
|
|
Loading…
Reference in a new issue