2017-01-31 15:57:42 +00:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
with import <stockholm/lib>;
|
|
|
|
|
|
|
|
# secrets used:
|
|
|
|
# wildcard.krebsco.de.crt
|
|
|
|
# wildcard.krebsco.de.key
|
|
|
|
# bepasty-secret.nix <- contains single string
|
|
|
|
|
|
|
|
with import <stockholm/lib>;
|
|
|
|
let
|
|
|
|
secKey = import <secrets/bepasty-secret.nix>;
|
2017-03-14 22:10:53 +00:00
|
|
|
ext-doms = [
|
|
|
|
"paste.lassul.us"
|
|
|
|
"paste.krebsco.de"
|
|
|
|
];
|
2017-01-31 15:57:42 +00:00
|
|
|
in {
|
|
|
|
|
|
|
|
services.nginx.enable = mkDefault true;
|
|
|
|
krebs.bepasty = {
|
|
|
|
enable = true;
|
|
|
|
serveNginx= true;
|
|
|
|
|
|
|
|
servers = {
|
|
|
|
"paste.r" = {
|
|
|
|
nginx = {
|
2018-01-09 18:10:46 +00:00
|
|
|
serverAliases = [
|
|
|
|
"paste.${config.krebs.build.host.name}"
|
|
|
|
"paste.r"
|
|
|
|
];
|
2017-01-31 15:57:42 +00:00
|
|
|
};
|
|
|
|
defaultPermissions = "admin,list,create,read,delete";
|
|
|
|
secretKey = secKey;
|
|
|
|
};
|
2017-03-14 22:10:53 +00:00
|
|
|
} //
|
|
|
|
genAttrs ext-doms (ext-dom: {
|
|
|
|
nginx = {
|
|
|
|
forceSSL = true;
|
|
|
|
enableACME = true;
|
2017-01-31 15:57:42 +00:00
|
|
|
};
|
2017-05-23 21:35:31 +00:00
|
|
|
defaultPermissions = "read,create";
|
2017-03-14 22:10:53 +00:00
|
|
|
secretKey = secKey;
|
|
|
|
});
|
2017-01-31 15:57:42 +00:00
|
|
|
};
|
|
|
|
}
|