diff options
author | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2023-09-07 22:36:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-07 22:36:18 +0200 |
commit | fdc0272b6096434e9bdbbff864cf106b58c2f24b (patch) | |
tree | 74bd1f1bebcf940cedbcb1d834ebbf1bf4dd8b4a /nixos/modules/services/backup | |
parent | 061f741b103850780e34bafed44f785a39e7ea20 (diff) | |
parent | 42f0af4abea7fb92a8cee685a69e75f74f5e2f14 (diff) |
Merge pull request #249941 from FrancescoDeSimone/duplicati-service-fix
nixos/duplicati: add package option
Diffstat (limited to 'nixos/modules/services/backup')
-rw-r--r-- | nixos/modules/services/backup/duplicati.nix | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/nixos/modules/services/backup/duplicati.nix b/nixos/modules/services/backup/duplicati.nix index 007396ebfc9b4..9b422635e7f08 100644 --- a/nixos/modules/services/backup/duplicati.nix +++ b/nixos/modules/services/backup/duplicati.nix @@ -10,6 +10,8 @@ in services.duplicati = { enable = mkEnableOption (lib.mdDoc "Duplicati"); + package = mkPackageOptionMD pkgs "duplicati" { }; + port = mkOption { default = 8200; type = types.port; @@ -53,7 +55,7 @@ in }; config = mkIf cfg.enable { - environment.systemPackages = [ pkgs.duplicati ]; + environment.systemPackages = [ cfg.package ]; systemd.services.duplicati = { description = "Duplicati backup"; @@ -63,7 +65,7 @@ in { User = cfg.user; Group = "duplicati"; - ExecStart = "${pkgs.duplicati}/bin/duplicati-server --webservice-interface=${cfg.interface} --webservice-port=${toString cfg.port} --server-datafolder=${cfg.dataDir}"; + ExecStart = "${cfg.package}/bin/duplicati-server --webservice-interface=${cfg.interface} --webservice-port=${toString cfg.port} --server-datafolder=${cfg.dataDir}"; Restart = "on-failure"; } (mkIf (cfg.dataDir == "/var/lib/duplicati") { @@ -83,4 +85,3 @@ in }; } - |