summaryrefslogtreecommitdiffstats
path: root/lass/2configs/fastpoke-pages.nix
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2015-07-29 14:56:06 +0200
committermakefu <github@syntax-fehler.de>2015-07-29 14:56:06 +0200
commit0bf2b871dda30231443324588ab8142e125e9774 (patch)
tree0646d45eab135eb2c7d8665c31d7ac135e29afff /lass/2configs/fastpoke-pages.nix
parent671710c573980d859cb82993cd0514058a63262f (diff)
parent1bf670270c1e87900a908f7e9b949b5502158f4f (diff)
merge cloudkrebs, fix path to krebs/4lib
Diffstat (limited to 'lass/2configs/fastpoke-pages.nix')
-rw-r--r--lass/2configs/fastpoke-pages.nix97
1 files changed, 97 insertions, 0 deletions
diff --git a/lass/2configs/fastpoke-pages.nix b/lass/2configs/fastpoke-pages.nix
new file mode 100644
index 000000000..74e92ccc3
--- /dev/null
+++ b/lass/2configs/fastpoke-pages.nix
@@ -0,0 +1,97 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+ createStaticPage = domain:
+ {
+ krebs.nginx.servers."${domain}" = {
+ server-names = [
+ "${domain}"
+ "www.${domain}"
+ ];
+ locations = [
+ (nameValuePair "/" ''
+ root /var/lib/http/${domain};
+ '')
+ ];
+ };
+ #networking.extraHosts = ''
+ # 10.243.206.102 ${domain}
+ #'';
+ };
+
+in {
+ imports = [
+ ../../3modules/lass/iptables.nix
+ ] ++ map createStaticPage [
+ "habsys.de"
+ "pixelpocket.de"
+ "karlaskop.de"
+ "ubikmedia.de"
+ "apanowicz.de"
+ ];
+
+ lass.iptables = {
+ tables = {
+ filter.INPUT.rules = [
+ { predicate = "-p tcp --dport http"; target = "ACCEPT"; }
+ ];
+ };
+ };
+
+
+ krebs.nginx = {
+ enable = true;
+ servers = {
+
+ #"habsys.de" = {
+ # server-names = [
+ # "habsys.de"
+ # "www.habsys.de"
+ # ];
+ # locations = [
+ # (nameValuePair "/" ''
+ # root /var/lib/http/habsys.de;
+ # '')
+ # ];
+ #};
+
+ #"karlaskop.de" = {
+ # server-names = [
+ # "karlaskop.de"
+ # "www.karlaskop.de"
+ # ];
+ # locations = [
+ # (nameValuePair "/" ''
+ # root /var/lib/http/karlaskop.de;
+ # '')
+ # ];
+ #};
+
+ #"pixelpocket.de" = {
+ # server-names = [
+ # "pixelpocket.de"
+ # "www.karlaskop.de"
+ # ];
+ # locations = [
+ # (nameValuePair "/" ''
+ # root /var/lib/http/karlaskop.de;
+ # '')
+ # ];
+ #};
+
+ };
+ };
+
+ #services.postgresql = {
+ # enable = true;
+ #};
+
+ #config.services.vsftpd = {
+ # enable = true;
+ # userlistEnable = true;
+ # userlistFile = pkgs.writeFile "vsftpd-userlist" ''
+ # '';
+ #};
+}