stuff
This commit is contained in:
@@ -31,6 +31,10 @@
|
|||||||
|
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
nixpkgs.hostPlatform = "aarch64-linux";
|
nixpkgs.hostPlatform = "aarch64-linux";
|
||||||
|
|
||||||
|
nix.gc = {
|
||||||
|
automatic = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,17 +3,17 @@
|
|||||||
__findFile,
|
__findFile,
|
||||||
modules,
|
modules,
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
{
|
|
||||||
# Basic caddy
|
# Basic caddy
|
||||||
modules.services.provides.caddy = {
|
modules.services.provides.caddy = {
|
||||||
nixos =
|
nixos = {config, ...}: {
|
||||||
{ config, ... }:
|
|
||||||
{
|
|
||||||
services.caddy = {
|
services.caddy = {
|
||||||
enable = true;
|
enable = true;
|
||||||
email = "doloroo@proton.me";
|
email = "doloroo@proton.me";
|
||||||
enableReload = true;
|
enableReload = true;
|
||||||
|
globalConfig = ''
|
||||||
|
acme_ca https://acme-v02.api.letsencrypt.org/directory
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -3,13 +3,14 @@
|
|||||||
__findFile,
|
__findFile,
|
||||||
modules,
|
modules,
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
{
|
|
||||||
# Basic traefik
|
# Basic traefik
|
||||||
modules.services.provides.ddns = {
|
modules.services.provides.ddns = {
|
||||||
nixos =
|
nixos = {
|
||||||
{ config, pkgs, ... }:
|
config,
|
||||||
let
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
ddnsImg = pkgs.dockerTools.pullImage {
|
ddnsImg = pkgs.dockerTools.pullImage {
|
||||||
imageName = "qmcgaw/ddns-updater";
|
imageName = "qmcgaw/ddns-updater";
|
||||||
imageDigest = "sha256:ee16ab4f6203bf9e5b0925d38a0b4ebf2d9f23771f933cfb2f5a2dbd5f9a2f88";
|
imageDigest = "sha256:ee16ab4f6203bf9e5b0925d38a0b4ebf2d9f23771f933cfb2f5a2dbd5f9a2f88";
|
||||||
@@ -18,8 +19,7 @@
|
|||||||
sha256 = "sha256-dMCHkvoFaORmGwbIM9io4Vc9fq+wBks25k2dmnW7naI=";
|
sha256 = "sha256-dMCHkvoFaORmGwbIM9io4Vc9fq+wBks25k2dmnW7naI=";
|
||||||
arch = "arm64";
|
arch = "arm64";
|
||||||
};
|
};
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
virtualisation.oci-containers.containers = {
|
virtualisation.oci-containers.containers = {
|
||||||
ddns = {
|
ddns = {
|
||||||
image = "qmcgaw/ddns-updater";
|
image = "qmcgaw/ddns-updater";
|
||||||
@@ -28,10 +28,18 @@
|
|||||||
"/data/ddns:/updater/data"
|
"/data/ddns:/updater/data"
|
||||||
"/etc/localtime:/etc/localtime:ro"
|
"/etc/localtime:/etc/localtime:ro"
|
||||||
];
|
];
|
||||||
# ports = [ "0.0.0.0:8123:8123" ];
|
ports = ["0.0.0.0:8125:8000"];
|
||||||
# networks = [ "meow" ];
|
# networks = [ "meow" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
services.caddy = pkgs.lib.mkIf config.services.caddy.enable {
|
||||||
|
virtualHosts."ddns.h.doloro.co.uk".extraConfig = ''
|
||||||
|
reverse_proxy :8125
|
||||||
|
basic_auth {
|
||||||
|
doloro $2a$14$FH.UkwC0PUsQ7IEV9XLAf.6/11KLsugCbrX/o6dPTx7NBlJWv3aiO
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
allowedUDPPortRanges = [];
|
allowedUDPPortRanges = [];
|
||||||
};
|
};
|
||||||
services.caddy = pkgs.lib.mkIf config.services.caddy.enable {
|
services.caddy = pkgs.lib.mkIf config.services.caddy.enable {
|
||||||
virtualHosts."dockerRegistry.h.doloro.co.uk".extraConfig = ''
|
virtualHosts."https://reg.h.doloro.co.uk".extraConfig = ''
|
||||||
reverse_proxy :5000
|
reverse_proxy :5000
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user