Skip to content

Commit

Permalink
nix: change nginx config (#11)
Browse files Browse the repository at this point in the history
* nix: fix nginx config
  • Loading branch information
schonfinkel authored Nov 1, 2024
1 parent d4309b0 commit 965cbe7
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
14 changes: 14 additions & 0 deletions modules/extras.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@
{
documentation.enable = false;

environment.systemPackages = with pkgs; [
lsof
docker-compose
];

virtualisation.docker = {
enable = true;
autoPrune = {
dates = "weekly";
enable = true;
flags = [ "--all" ];
};
};

# Networking
networking.firewall.allowedTCPPorts = [ 22 80 443 ];
networking.hostName = "trashcan";
Expand Down
14 changes: 7 additions & 7 deletions modules/nginx.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
recommendedProxySettings = true;
#recommendedTlsSettings = true;

virtualHosts.localhost = {
locations."/" = {
return = "200 '<html><body>It works</body></html>'";
extraConfig = ''
default_type text/html;
'';
};
streamConfig = ''
server {
listen 8080;
proxy_pass localhost:8080;
}
'';

virtualHosts.localhost = {
locations."/robots.txt" = {
extraConfig = ''
rewrite ^/(.*) $1;
Expand Down

0 comments on commit 965cbe7

Please sign in to comment.