From 98ac43a1cf689ecabe448489b5505107ee893ce9 Mon Sep 17 00:00:00 2001 From: Shawn8901 Date: Sun, 10 Jul 2022 20:32:27 +0200 Subject: [PATCH] zrepl: add package option to module (#179189) Co-authored-by: Sandro --- nixos/modules/services/backup/zrepl.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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.