-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6cbe73b
commit 6e5b082
Showing
46 changed files
with
1,323 additions
and
659 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
{pkgs, ...}: let | ||
dockerImage = pkgs.dockerTools.pullImage { | ||
imageName = "wordpress"; | ||
finalImageTag = "latest"; | ||
imageDigest = "sha256:d2d062bf3903cd7b73442a5266acff12f00ed66b48808f9b0d269e8d775b429f"; | ||
sha256 = "u8P1PE8R4v6rncL8PvZktj2ExxD+TXIARg9JqIk6wY0="; | ||
}; | ||
in { | ||
systemd.tmpfiles.rules = [ | ||
"d /persist/cosmovert 755 33 33 - -" | ||
]; | ||
|
||
services.nginx.virtualHosts."cosmovert.ru" = { | ||
useACMEHost = "cosmovert.ru"; | ||
locations."/".proxyPass = "http://127.0.0.1:8527"; | ||
locations."/".proxyWebsockets = true; | ||
}; | ||
|
||
# networking.firewall.interfaces."vms".allowedTCPPorts = [3306]; | ||
|
||
# containers.cosmovert = { | ||
# autoStart = true; | ||
# ephemeral = true; | ||
|
||
# privateNetwork = true; | ||
# hostBridge = "vms"; | ||
# localAddress = "192.168.12.73/24"; | ||
|
||
# extraFlags = ["--system-call-filter=@keyring" "--system-call-filter=bpf"]; | ||
|
||
# bindMounts = { | ||
# "/wp-data" = { | ||
# hostPath = "/persist/cosmovert"; | ||
# isReadOnly = false; | ||
# }; | ||
# }; | ||
|
||
# config = { | ||
# config, | ||
# pkgs, | ||
# ... | ||
# }: { | ||
# system.stateVersion = "24.05"; | ||
|
||
# networking = { | ||
# defaultGateway = { | ||
# address = "192.168.12.1"; | ||
# interface = "eth0"; | ||
# }; | ||
# firewall.enable = false; | ||
# useHostResolvConf = false; | ||
# nameservers = ["9.9.9.9" "8.8.8.8" "1.1.1.1" "77.88.8.8"]; | ||
# }; | ||
# services.resolved.enable = true; | ||
|
||
virtualisation.oci-containers = { | ||
containers = { | ||
cosmovert-wp = { | ||
image = "wordpress"; | ||
imageFile = dockerImage; | ||
volumes = [ | ||
"/persist/cosmovert:/var/www/html" | ||
]; | ||
ports = ["127.0.0.1:8527:80"]; | ||
extraOptions = ["--network=slirp4netns"]; | ||
environment = { | ||
TZ = "Europe/Moscow"; | ||
ENABLE_HTTPS = "true"; | ||
}; | ||
}; | ||
}; | ||
backend = "podman"; | ||
}; | ||
# }; | ||
# }; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{ | ||
config, | ||
lib, | ||
... | ||
}: { | ||
services.coredns = { | ||
enable = true; | ||
config = let | ||
nullsProxy = domain: '' | ||
forward ${domain} tls://51.195.92.136 tls://54.38.198.100 tls://79.127.215.166 tls://79.127.215.167 tls://179.43.146.42 { | ||
tls_servername dns.nullsproxy.com | ||
} | ||
''; | ||
common = '' | ||
errors | ||
prometheus | ||
cache | ||
any | ||
${nullsProxy "supercell.com"} | ||
${nullsProxy "clashofclans.com"} | ||
${nullsProxy "brawlstars.com"} | ||
${nullsProxy "brawlstarsgame.com"} | ||
forward . tls://1.1.1.1 tls://1.0.0.1 { | ||
tls_servername cloudflare-dns.com | ||
health_check 15s | ||
} | ||
''; | ||
certDir = config.security.acme.certs."neutrino.su".directory; | ||
in '' | ||
. { | ||
${common} | ||
} | ||
tls://. { | ||
tls ${certDir}/fullchain.pem ${certDir}/key.pem ${certDir}/chain.pem | ||
${common} | ||
} | ||
''; | ||
}; | ||
systemd.services.coredns.serviceConfig.SupplementaryGroups = ["acme"]; | ||
|
||
networking.firewall.allowedUDPPorts = [53]; | ||
networking.firewall.allowedTCPPorts = [53 853]; | ||
|
||
services.resolved.enable = lib.mkForce false; | ||
networking.resolvconf.useLocalResolver = true; | ||
} |
Oops, something went wrong.