Compare commits

..

2 Commits

Author SHA1 Message Date
Sky Hearn 6618318370 ACME and SSL stuff 2024-03-07 05:34:47 +00:00
Sky Hearn 3a8a31cb99 probably working ddns setup (it does not work and I know it) 2024-03-07 03:30:41 +00:00
3 changed files with 34 additions and 3 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.
@ -28,6 +29,12 @@
"nixpkgs=${pkgs.path}" "nixpkgs=${pkgs.path}"
]; ];
# ACME
security.acme = {
acceptTerms = true;
defaults.email = "sky.hearn@pm.me";
};
# wireguard server setup # wireguard server setup
# enable NAT # enable NAT
networking.nat.enable = true; networking.nat.enable = true;
@ -94,7 +101,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";
};
};
}

View File

@ -1,8 +1,8 @@
{ config, ... }: { config, ... }:
{ {
services.nginx.virtualHosts."git.my-domain.tld" = { services.nginx.virtualHosts."git.skymath.duckdns.org" = {
enableACME = false; enableACME = true;
forceSSL = false; forceSSL = true;
locations."/" = { locations."/" = {
proxyPass = "http://localhost:3001/"; proxyPass = "http://localhost:3001/";
}; };