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 = {
|
options = {
|
||||||
services.duplicati = {
|
services.duplicati = {
|
||||||
enable = mkEnableOption "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 = {
|
serviceConfig = {
|
||||||
User = "duplicati";
|
User = "duplicati";
|
||||||
Group = "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";
|
Restart = "on-failure";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user