2016-04-09 12:21:39 +00:00
|
|
|
{ config, pkgs, lib, ... }:
|
2016-02-01 15:04:05 +00:00
|
|
|
|
2016-06-18 17:21:32 +00:00
|
|
|
with lib;
|
2016-04-09 12:21:39 +00:00
|
|
|
let
|
2016-05-31 21:26:35 +00:00
|
|
|
inherit (import <stockholm/krebs/4lib> { config = {}; inherit lib; })
|
|
|
|
genid
|
|
|
|
head
|
|
|
|
;
|
|
|
|
inherit (import <stockholm/lass/2configs/websites/util.nix> {inherit lib pkgs;})
|
2016-04-09 12:21:39 +00:00
|
|
|
ssl
|
|
|
|
servePage
|
2016-05-31 21:26:35 +00:00
|
|
|
serveWordpress
|
|
|
|
;
|
2016-02-01 15:04:05 +00:00
|
|
|
|
2016-06-13 11:49:24 +00:00
|
|
|
msmtprc = pkgs.writeText "msmtprc" ''
|
|
|
|
account localhost
|
|
|
|
host localhost
|
|
|
|
account default: localhost
|
|
|
|
'';
|
|
|
|
|
|
|
|
sendmail = pkgs.writeDash "msmtp" ''
|
|
|
|
exec ${pkgs.msmtp}/bin/msmtp --read-envelope-from -C ${msmtprc} "$@"
|
|
|
|
'';
|
|
|
|
|
2016-04-09 12:21:39 +00:00
|
|
|
in {
|
2016-02-01 15:04:05 +00:00
|
|
|
imports = [
|
2016-05-31 22:13:19 +00:00
|
|
|
./sqlBackup.nix
|
|
|
|
(ssl [ "biostase.de" "www.biostase.de" ])
|
|
|
|
(serveWordpress [ "biostase.de" "www.biostase.de" ])
|
2016-04-09 12:21:39 +00:00
|
|
|
|
2016-05-31 22:13:19 +00:00
|
|
|
(ssl [ "radical-dreamers.de" "www.radical-dreamers.de" ])
|
|
|
|
(serveWordpress [ "radical-dreamers.de" "www.radical-dreamers.de" ])
|
2016-04-09 12:21:39 +00:00
|
|
|
|
2016-05-31 22:13:19 +00:00
|
|
|
(ssl [ "gs-maubach.de" "www.gs-maubach.de" ])
|
|
|
|
(serveWordpress [ "gs-maubach.de" "www.gs-maubach.de" ])
|
2016-04-09 12:21:39 +00:00
|
|
|
|
2016-05-31 22:13:19 +00:00
|
|
|
(ssl [ "spielwaren-kern.de" "www.spielwaren-kern.de" ])
|
|
|
|
(serveWordpress [ "spielwaren-kern.de" "www.spielwaren-kern.de" ])
|
2016-02-01 15:04:05 +00:00
|
|
|
|
2016-05-31 22:13:19 +00:00
|
|
|
(ssl [ "familienpraxis-korntal.de" "www.familienpraxis-korntal.de" ])
|
|
|
|
(servePage [ "familienpraxis-korntal.de" "www.familienpraxis-korntal.de" ])
|
2016-04-09 12:21:39 +00:00
|
|
|
|
2016-05-31 22:13:19 +00:00
|
|
|
(ssl [ "ttf-kleinaspach.de" "www.ttf-kleinaspach.de" ])
|
|
|
|
(serveWordpress [ "ttf-kleinaspach.de" "www.ttf-kleinaspach.de" ])
|
2016-04-09 12:21:39 +00:00
|
|
|
|
2016-05-31 22:13:19 +00:00
|
|
|
(ssl [ "eastuttgart.de" "www.eastuttgart.de" ])
|
|
|
|
(serveWordpress [ "eastuttgart.de" "www.eastuttgart.de" ])
|
2016-04-13 14:32:04 +00:00
|
|
|
|
2016-05-31 22:13:19 +00:00
|
|
|
(ssl [ "habsys.de" "www.habsys.de" "habsys.eu" "www.habsys.eu" ])
|
|
|
|
(servePage [ "habsys.de" "www.habsys.de" "habsys.eu" "www.habsys.eu" ])
|
2016-04-09 12:21:39 +00:00
|
|
|
];
|
2016-02-01 15:04:05 +00:00
|
|
|
|
2016-05-31 22:13:19 +00:00
|
|
|
lass.mysqlBackup.config.all.databases = [
|
|
|
|
"biostase_de"
|
|
|
|
"eastuttgart_de"
|
|
|
|
"radical_dreamers_de"
|
|
|
|
"spielwaren_kern_de"
|
|
|
|
"ttf_kleinaspach_de"
|
|
|
|
];
|
2016-04-13 14:33:25 +00:00
|
|
|
|
2016-06-18 17:21:32 +00:00
|
|
|
#password protect some dirs
|
|
|
|
krebs.nginx.servers."biostase.de".locations = [
|
|
|
|
(nameValuePair "/old_biostase.de" ''
|
|
|
|
auth_basic "Administrator Login";
|
2016-06-22 17:27:39 +00:00
|
|
|
auth_basic_user_file /srv/http/biostase.de/old_biostase.de/.htpasswd;
|
2016-06-18 17:21:32 +00:00
|
|
|
'')
|
|
|
|
(nameValuePair "/mysqldumper" ''
|
|
|
|
auth_basic "Administrator Login";
|
2016-06-22 17:27:39 +00:00
|
|
|
auth_basic_user_file /srv/http/biostase.de/mysqldumper/.htpasswd;
|
2016-06-18 17:21:32 +00:00
|
|
|
'')
|
|
|
|
];
|
|
|
|
|
2016-05-24 21:21:43 +00:00
|
|
|
users.users.root.openssh.authorizedKeys.keys = [
|
|
|
|
config.krebs.users.fritz.pubkey
|
|
|
|
];
|
2016-06-13 11:49:24 +00:00
|
|
|
|
2016-07-07 20:06:10 +00:00
|
|
|
services.phpfpm.phpIni = pkgs.runCommand "php.ini" {
|
|
|
|
options = ''
|
|
|
|
extension=${pkgs.phpPackages.apcu}/lib/php/extensions/apcu.so
|
|
|
|
sendmail_path = "${sendmail} -t -i"
|
|
|
|
'';
|
|
|
|
} ''
|
|
|
|
cat ${pkgs.php}/etc/php-recommended.ini > $out
|
|
|
|
echo "$options" >> $out
|
2016-06-13 11:49:24 +00:00
|
|
|
'';
|
2016-02-01 15:04:05 +00:00
|
|
|
}
|