diff options
author | makefu <makefu@tsp> | 2015-08-14 14:00:18 +0000 |
---|---|---|
committer | makefu <makefu@tsp> | 2015-08-14 14:00:18 +0000 |
commit | d35de37b0d2b9d5d567a530726aa01f2ec686bf3 (patch) | |
tree | 8bcccdb27a1c0087668cd9d63bb294e71f4cb79a /lass/2configs/wordpress.nix | |
parent | c36ea0e029772649e33a727a9be15986cbb1fed2 (diff) | |
parent | b8b2575d8313cfd0696a121cee1b8738faff6638 (diff) |
Merge remote-tracking branch 'cd/master'
Diffstat (limited to 'lass/2configs/wordpress.nix')
-rw-r--r-- | lass/2configs/wordpress.nix | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/lass/2configs/wordpress.nix b/lass/2configs/wordpress.nix new file mode 100644 index 000000000..9458deb38 --- /dev/null +++ b/lass/2configs/wordpress.nix @@ -0,0 +1,59 @@ +{ config, pkgs, ... }: + +{ + containers.wordpress = { + privateNetwork = true; + hostAddress = "192.168.101.1"; + localAddress = "192.168.101.2"; + + config = { + imports = [ + ../3modules/iptables.nix + ]; + + lass.iptables = { + enable = true; + tables = { + filter.INPUT.policy = "DROP"; + filter.FORWARD.policy = "DROP"; + filter.INPUT.rules = [ + { predicate = "-m conntrack --ctstate RELATED,ESTABLISHED"; target = "ACCEPT"; precedence = 10001; } + { predicate = "-p icmp"; target = "ACCEPT"; precedence = 10000; } + { predicate = "-i lo"; target = "ACCEPT"; precedence = 9999; } + { predicate = "-p tcp --dport 22"; target = "ACCEPT"; precedence = 9998; } + { predicate = "-p tcp --dport 80"; target = "ACCEPT"; precedence = 9998; } + ]; + }; + }; + + environment.systemPackages = with pkgs; [ + iptables + ]; + + services.postgresql = { + enable = true; + package = pkgs.postgresql; + }; + + services.httpd = { + enable = true; + adminAddr = "root@apanowicz.de"; + extraModules = [ + { name = "php5"; path = "${pkgs.php}/modules/libphp5.so"; } + ]; + virtualHosts = [ + { + hostName = "wordpress"; + serverAliases = [ "wordpress" "www.wordpress" ]; + + extraSubservices = [ + { + serviceName = "wordpress"; + } + ]; + } + ]; + }; + }; + }; +} |