l 2: add paste.nix
This commit is contained in:
parent
c898a59d53
commit
2260ebedf7
26
lass/2configs/paste.nix
Normal file
26
lass/2configs/paste.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{ config, pkgs, ... }:
|
||||
with import <stockholm/lib>;
|
||||
|
||||
{
|
||||
services.nginx.virtualHosts.paste = {
|
||||
serverAliases = [ "p.r" ];
|
||||
locations."/".extraConfig = ''
|
||||
proxy_set_header Host $host;
|
||||
proxy_pass http://localhost:9081;
|
||||
'';
|
||||
};
|
||||
krebs.htgen.paste = {
|
||||
port = 9081;
|
||||
script = toString [
|
||||
"PATH=${makeBinPath [
|
||||
pkgs.nix
|
||||
]}:$PATH"
|
||||
"STATEDIR=$HOME"
|
||||
". ${pkgs.htgen}/examples/paste"
|
||||
];
|
||||
};
|
||||
krebs.iptables.tables.filter.INPUT.rules = [
|
||||
{ predicate = "-i retiolum -p tcp --dport 80"; target = "ACCEPT";}
|
||||
{ predicate = "-i retiolum -p tcp --dport 9081"; target = "ACCEPT";}
|
||||
];
|
||||
}
|
Loading…
Reference in a new issue