mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-29 06:45:54 +03:00
Merge pull request #41057 from nyanloutre/duplicati/custom_options
nixos/duplicati: add port and datafolder options
This commit is contained in:
commit
8219b4a7ab
@ -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";
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user