summary refs log tree commit diff
path: root/nixos/modules/services/backup/duplicati.nix
diff options
context:
space:
mode:
authorOrivej Desh <orivej@gmx.fr>2018-06-09 07:41:38 +0000
committerOrivej Desh <orivej@gmx.fr>2018-06-09 07:41:38 +0000
commita448357dc62b26c95c3df84a156656e54aaf58b1 (patch)
treef12d66a0b81f2fbaa70db89b516a66bddc1b838c /nixos/modules/services/backup/duplicati.nix
parent06fa8674984e8ab637a29b91bdaa11dc5cbacb80 (diff)
parent0e07efa3c53b588dcd2efca8fafb35c779869d4e (diff)
downloadnixlib-a448357dc62b26c95c3df84a156656e54aaf58b1.tar
nixlib-a448357dc62b26c95c3df84a156656e54aaf58b1.tar.gz
nixlib-a448357dc62b26c95c3df84a156656e54aaf58b1.tar.bz2
nixlib-a448357dc62b26c95c3df84a156656e54aaf58b1.tar.lz
nixlib-a448357dc62b26c95c3df84a156656e54aaf58b1.tar.xz
nixlib-a448357dc62b26c95c3df84a156656e54aaf58b1.tar.zst
nixlib-a448357dc62b26c95c3df84a156656e54aaf58b1.zip
Merge branch 'master' into staging
* master: (71 commits)
  xen: enable parallel building
  spice: 0.13.3 -> 0.14.0
  powerline-rs: 0.1.7 -> 0.1.8 (#41736)
  xidlehook: 0.4.6 -> 0.4.8 (#41094)
  serf: update scons patch, enable kerberos on darwin
  firefox-bin: Add ffmpeg to lib path
  firefox-beta-bin: 61.0b10 -> 61.0b12
  firefox-devedition-bin: 61.0b10 -> 61.0b12
  wireguard-go: assign yegortimoshenko as maintainer
  wireguard-go: 0.0.20180519 -> 0.0.20180531
  zfs: Fix "zfs-sync" for modern systemd
  nixos/memcached: added simple set/get test
  jenkins: 2.89.4 -> 2.107.3 (#41618)
  focuswriter: 1.6.12 -> 1.6.13 (#41567)
  ne: 3.0.1 -> 3.1.1 (#41536)
  libpqxx: 6.2.3 -> 6.2.4 (#41547)
  mate.mate-applets: 1.20.1 -> 1.20.2 (#41546)
  mate.mate-themes: 3.22.16 -> 3.22.17 (#41541)
  nixos/munge: run munge as user munge instead of root. (#41509)
  pstoedit: 3.71 -> 3.73 (#41528)
  ...
Diffstat (limited to 'nixos/modules/services/backup/duplicati.nix')
-rw-r--r--nixos/modules/services/backup/duplicati.nix19
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";
       };
     };