2015-07-23 00:20:44 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
2015-07-24 12:00:28 +00:00
|
|
|
|
|
|
|
let
|
|
|
|
createStaticPage = domain:
|
|
|
|
{
|
2015-07-27 11:55:16 +00:00
|
|
|
krebs.nginx.servers."${domain}" = {
|
2015-07-24 12:00:28 +00:00
|
|
|
server-names = [
|
|
|
|
"${domain}"
|
|
|
|
"www.${domain}"
|
|
|
|
];
|
|
|
|
locations = [
|
|
|
|
(nameValuePair "/" ''
|
|
|
|
root /var/lib/http/${domain};
|
|
|
|
'')
|
|
|
|
];
|
|
|
|
};
|
|
|
|
#networking.extraHosts = ''
|
|
|
|
# 10.243.206.102 ${domain}
|
|
|
|
#'';
|
|
|
|
};
|
|
|
|
|
|
|
|
in {
|
2015-07-23 00:20:44 +00:00
|
|
|
imports = [
|
|
|
|
../../3modules/lass/iptables.nix
|
2015-07-24 12:00:28 +00:00
|
|
|
] ++ map createStaticPage [
|
|
|
|
"habsys.de"
|
|
|
|
"pixelpocket.de"
|
|
|
|
"karlaskop.de"
|
|
|
|
"ubikmedia.de"
|
|
|
|
"apanowicz.de"
|
|
|
|
"aidsballs.de"
|
2015-07-23 00:20:44 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
lass.iptables = {
|
|
|
|
tables = {
|
|
|
|
filter.INPUT.rules = [
|
|
|
|
{ predicate = "-p tcp --dport http"; target = "ACCEPT"; }
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2015-07-27 11:55:16 +00:00
|
|
|
krebs.nginx = {
|
2015-07-23 00:20:44 +00:00
|
|
|
enable = true;
|
|
|
|
servers = {
|
|
|
|
|
2015-07-24 12:00:28 +00:00
|
|
|
#"habsys.de" = {
|
|
|
|
# server-names = [
|
|
|
|
# "habsys.de"
|
|
|
|
# "www.habsys.de"
|
|
|
|
# ];
|
|
|
|
# locations = [
|
|
|
|
# (nameValuePair "/" ''
|
|
|
|
# root /var/lib/http/habsys.de;
|
|
|
|
# '')
|
|
|
|
# ];
|
|
|
|
#};
|
2015-07-23 00:20:44 +00:00
|
|
|
|
2015-07-24 12:00:28 +00:00
|
|
|
#"karlaskop.de" = {
|
|
|
|
# server-names = [
|
|
|
|
# "karlaskop.de"
|
|
|
|
# "www.karlaskop.de"
|
|
|
|
# ];
|
|
|
|
# locations = [
|
|
|
|
# (nameValuePair "/" ''
|
|
|
|
# root /var/lib/http/karlaskop.de;
|
|
|
|
# '')
|
|
|
|
# ];
|
|
|
|
#};
|
2015-07-23 00:20:44 +00:00
|
|
|
|
2015-07-24 12:00:28 +00:00
|
|
|
#"pixelpocket.de" = {
|
|
|
|
# server-names = [
|
|
|
|
# "pixelpocket.de"
|
|
|
|
# "www.karlaskop.de"
|
|
|
|
# ];
|
|
|
|
# locations = [
|
|
|
|
# (nameValuePair "/" ''
|
|
|
|
# root /var/lib/http/karlaskop.de;
|
|
|
|
# '')
|
|
|
|
# ];
|
|
|
|
#};
|
2015-07-23 00:20:44 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
networking.extraHosts = ''
|
|
|
|
10.243.206.102 habsys.de karlaskop.de pixelpocket.de ubikmedia.de apanowicz.de
|
|
|
|
10.243.206.102 aidsballs.de
|
|
|
|
'';
|
|
|
|
|
|
|
|
#services.postgresql = {
|
|
|
|
# enable = true;
|
|
|
|
#};
|
|
|
|
|
|
|
|
#config.services.vsftpd = {
|
|
|
|
# enable = true;
|
|
|
|
# userlistEnable = true;
|
|
|
|
# userlistFile = pkgs.writeFile "vsftpd-userlist" ''
|
|
|
|
# '';
|
|
|
|
#};
|
|
|
|
}
|