93 lines
1.7 KiB
Nix
93 lines
1.7 KiB
Nix
{
|
|
config,
|
|
pkgs,
|
|
inputs,
|
|
...
|
|
}:
|
|
|
|
let
|
|
domain = "http://marty-server";
|
|
netname = "tamatas-upcycling";
|
|
ipv4host = "192.168.101.10";
|
|
ipv4local = "192.168.101.11";
|
|
ipv6host = "fc00::101:1";
|
|
ipv6local = "fc00::101:2";
|
|
porthost1 = 9001;
|
|
portlocal1 = 80;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
networking = {
|
|
hosts = {
|
|
ipv4local = [ netname ];
|
|
ipv6local = [ netname ];
|
|
};
|
|
};
|
|
|
|
containers.tamatas-upcycling = {
|
|
autoStart = true;
|
|
privateNetwork = true;
|
|
hostAddress = ipv4host;
|
|
localAddress = ipv4local;
|
|
hostAddress6 = ipv6host;
|
|
localAddress6 = ipv6local;
|
|
forwardPorts = [
|
|
{
|
|
hostPort = porthost1;
|
|
containerPort = portlocal1;
|
|
}
|
|
];
|
|
bindMounts = {
|
|
};
|
|
|
|
config =
|
|
{
|
|
config,
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}:
|
|
{
|
|
|
|
users = {
|
|
users = {
|
|
marty = {
|
|
group = "users";
|
|
isSystemUser = true;
|
|
};
|
|
};
|
|
groups = {
|
|
users = { };
|
|
};
|
|
};
|
|
|
|
services = {
|
|
wordpress.sites."tamatas-upcycling.de" = {
|
|
languages = [ pkgs.wordpressPackages.languages.de_DE ];
|
|
settings = {
|
|
WPLANG = "de_DE";
|
|
WP_SITEURL = domain;
|
|
WP_HOME = domain;
|
|
};
|
|
};
|
|
phpfpm.pools."wordpress-tamatas-upcycling.de".phpOptions = ''
|
|
upload_max_filesize=1G
|
|
post_max_size=1G
|
|
'';
|
|
resolved.enable = true;
|
|
};
|
|
|
|
networking = {
|
|
firewall = {
|
|
enable = true;
|
|
allowedTCPPorts = [ portlocal1 ];
|
|
};
|
|
useHostResolvConf = lib.mkForce false;
|
|
};
|
|
|
|
system.stateVersion = "25.05";
|
|
};
|
|
};
|
|
}
|