diff --git a/nixos/modules/services/backup/zrepl.nix b/nixos/modules/services/backup/zrepl.nix index 73f5e4d9f6d7..1b4216ed1714 100644 --- a/nixos/modules/services/backup/zrepl.nix +++ b/nixos/modules/services/backup/zrepl.nix @@ -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 ` 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.