Files
dotfiles/system-modules/nx2site.nix
Lennart J. Kurzweg (Nx2) 8d1a58d42c merge ace helix
2024-05-07 16:58:47 +02:00

29 lines
637 B
Nix

{ config, pkgs, lib, user, host, ... }:
{
imports = if host == "NxACE" then [
] else [];
config = lib.mkIf (host == "NxACE") {
systemd = {
timers."namecheap-dynamic-dns" = {
wantedBy = [ "timers.target" ];
timerConfig = {
OnBootSec = "2m";
OnUnitActiveSec = "10m";
Unit = "namecheap-dynamic-dns.service";
};
};
services."namecheap-dynamic-dns" = {
script = ''
/home/nx2/nx2site/domain/update-namecheap.sh
'';
serviceConfig = {
Type = "oneshot";
User = "nx2";
};
};
};
};
}