Archive of broken or unused modules

This commit is contained in:
Chris Toph 2025-01-13 23:38:58 -05:00
parent 32a703b4e1
commit 6ff47b3403
8 changed files with 96 additions and 16 deletions

View file

@ -0,0 +1 @@
CF_DNS_API_TOKEN=

View file

@ -0,0 +1,17 @@
{ config, lib, pkgs, ... }: {
# letsencrypt
security.acme = {
acceptTerms = true;
defaults = {
email = "chris@toph.cc";
dnsProvider = "cloudflare";
environmentFile = ./cloudflare.ini;
};
certs = {
"ryot.foo" = {
extraDomainNames = ["*.ryot.foo"];
};
};
};
}

View file

@ -0,0 +1,17 @@
{
services.caddy = {
enable = true;
virtualHosts = {
"*.ryot.foo" = {
useACMEHost = "ryot.foo";
extraConfig = builtins.readFile ./ryot.foo.conf;
};
"ryot.foo" = {
useACMEHost = "ryot.foo";
extraConfig = builtins.readFile ./ryot.foo.conf;
};
};
};
}

View file

@ -0,0 +1,13 @@
reverse_proxy http://localhost:8080 {
header_up Host {host}
header_up X-Real-IP {remote}
header_up X-Forwarded-For {remote}
header_up X-Forwarded-Proto {scheme}
}
reverse_proxy https://localhost:4433 {
header_up Host {host}
header_up X-Real-IP {remote}
header_up X-Forwarded-For {remote}
header_up X-Forwarded-Proto {scheme}
}

View file

@ -0,0 +1 @@
$2b$05$RAavFe61.2iBTeGdtCI5EuKmFXxRbh/OL199HjBN74hSBCXzxViqS

View file

@ -0,0 +1 @@
<HASHED_PASS>

View file

@ -0,0 +1,19 @@
{
enable = true;
fqdn = "mail.ryot.foo";
domains = [ "ryot.foo" ];
enableImapSsl = true;
enableSubmissionSsl = true;
# A list of all login accounts. To create the password hashes, use
# nix-shell -p mkpasswd --run 'mkpasswd -sm bcrypt'
loginAccounts = {
"[REDACTED]" = {
hashedPassword = builtins.readFile ./admin.pass;
aliases = ["[REDACTED]"];
};
};
certificateScheme = "acme";
}

View file

@ -1,29 +1,40 @@
{ modulesPath, config, pkgs, hostName, ... }: {
modulesPath,
config,
pkgs,
hostName,
...
}:
{ {
## MODULES & IMPORTS ## ## MODULES & IMPORTS ##
imports = [ imports = [
# Common Modules # Common Modules
../../common/acme ../../common/acme
../../common/lxc ../../common/lxc
../../common/ssh ../../common/ssh
# Import hardware configuration. # Import hardware configuration.
./hardware.nix ./hardware.nix
# Local Modules # Local Modules
# caddy # caddy
./modules/caddy ./modules/caddy
./modules/cloudflared ./modules/cloudflared
]; ];
## NETWORKING ## ## NETWORKING ##
networking.firewall = { networking.firewall = {
allowedTCPPorts = [ 22 80 443 14333 ]; allowedTCPPorts = [
22
80
443
14333
];
allowedUDPPorts = [ 53 ]; allowedUDPPorts = [ 53 ];
interfaces.podman1 = { interfaces.podman1 = {
# so that containers find eachother's names # so that containers find eachother's names
allowedUDPPorts = [ 53 ]; allowedUDPPorts = [ 53 ];
}; };
}; };
@ -35,7 +46,7 @@
ranger ranger
sshfs sshfs
]; ];
environment.etc = { environment.etc = {
"cloudflared/.keep" = { "cloudflared/.keep" = {
text = "This directory is used to store cloudflared configuration files."; text = "This directory is used to store cloudflared configuration files.";