diff options
author | Peter Hoeg <peter@hoeg.com> | 2018-06-09 12:29:48 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-09 12:29:48 +0800 |
commit | 8219b4a7ab2bf4aa3b84b024e81be799ae02a313 (patch) | |
tree | cb9dc0009a240af6bb2e11bd9101ab22a3a21e0e /nixos | |
parent | 500f1a94388f817b9d2d91ffbb68cf554268c2d7 (diff) | |
parent | 20f6c5c865a488f339ac47346702dd4394facaf7 (diff) | |
download | nixlib-8219b4a7ab2bf4aa3b84b024e81be799ae02a313.tar nixlib-8219b4a7ab2bf4aa3b84b024e81be799ae02a313.tar.gz nixlib-8219b4a7ab2bf4aa3b84b024e81be799ae02a313.tar.bz2 nixlib-8219b4a7ab2bf4aa3b84b024e81be799ae02a313.tar.lz nixlib-8219b4a7ab2bf4aa3b84b024e81be799ae02a313.tar.xz nixlib-8219b4a7ab2bf4aa3b84b024e81be799ae02a313.tar.zst nixlib-8219b4a7ab2bf4aa3b84b024e81be799ae02a313.zip |
Merge pull request #41057 from nyanloutre/duplicati/custom_options
nixos/duplicati: add port and datafolder options
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/backup/duplicati.nix | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/nixos/modules/services/backup/duplicati.nix b/nixos/modules/services/backup/duplicati.nix index 9772ca4d20a7..379fde1fe038 100644 --- a/nixos/modules/services/backup/duplicati.nix +++ b/nixos/modules/services/backup/duplicati.nix @@ -9,6 +9,23 @@ in options = { services.duplicati = { enable = mkEnableOption "Duplicati"; + + port = mkOption { + default = 8200; + type = types.int; + description = '' + Port serving the web interface + ''; + }; + + interface = mkOption { + default = "lo"; + type = types.str; + description = '' + Listening interface for the web UI + Set it to "any" to listen on all available interfaces + ''; + }; }; }; @@ -22,7 +39,7 @@ in serviceConfig = { User = "duplicati"; Group = "duplicati"; - ExecStart = "${pkgs.duplicati}/bin/duplicati-server --webservice-interface=any --webservice-port=8200 --server-datafolder=/var/lib/duplicati"; + ExecStart = "${pkgs.duplicati}/bin/duplicati-server --webservice-interface=${cfg.interface} --webservice-port=${toString cfg.port} --server-datafolder=/var/lib/duplicati"; Restart = "on-failure"; }; }; |