nix/os/modules: add ddclient-ovh module
This commit is contained in:
parent
a3effb5d29
commit
fdf0160458
1 changed files with 30 additions and 0 deletions
30
nix/os/modules/ddclient-ovh.nix
Normal file
30
nix/os/modules/ddclient-ovh.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{ lib
|
||||
, config
|
||||
, ... }:
|
||||
|
||||
let
|
||||
cfg = config.services.ddclientovh;
|
||||
|
||||
passwords = import ../../variables/passwords.crypt.nix;
|
||||
|
||||
in {
|
||||
|
||||
options.services.ddclientovh = with lib; {
|
||||
enable = mkEnableOption "Enable ddclient-ovh";
|
||||
domain = mkOption {
|
||||
type = types.string;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.ddclient = {
|
||||
enable = true;
|
||||
protocol = "dyndns2";
|
||||
server = "www.ovh.com";
|
||||
ssl = true;
|
||||
domains = [ cfg.domain ];
|
||||
use = "web, web=ifconfig.co";
|
||||
inherit (passwords.dyndns.${cfg.domain}) username password;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue