probably working ddns setup (it does not work and I know it)

This commit is contained in:
Sky Hearn 2024-03-07 03:30:41 +00:00
parent 42768ab36e
commit 3a8a31cb99
2 changed files with 25 additions and 0 deletions

View File

@ -14,6 +14,7 @@
./hardware-configuration.nix ./hardware-configuration.nix
./users/users.nix ./users/users.nix
./services/gitea.nix ./services/gitea.nix
./services/duckddns.nix
]; ];
# Use the systemd-boot EFI boot loader. # Use the systemd-boot EFI boot loader.
@ -94,7 +95,9 @@
virtualisation.podman.defaultNetwork.settings.dns_enabled = true; virtualisation.podman.defaultNetwork.settings.dns_enabled = true;
environment.systemPackages = [ environment.systemPackages = [
pkgs.bash
pkgs.wget pkgs.wget
pkgs.curl
pkgs.vim pkgs.vim
pkgs.arion pkgs.arion

22
services/duckddns.nix Normal file
View File

@ -0,0 +1,22 @@
{pkgs, ...}:
{
systemd.timers."duckddns" = {
wantedBy = [ "timers.target" ];
timerConfig = {
OnBootSec = "5m";
OnUnitActiveSec = "5m";
Unit = "duckddns.service";
};
};
systemd.services."duckddns"= {
# hiding my token hehe
script = ''
bash /home/sky/duckddns.sh
'';
serviceConfig = {
Type = "oneshot";
User = "root";
};
};
}