Skip to content

Commit

Permalink
fix(hosts/server-main-elis): Add robots.txt to home.elis.nu
Browse files Browse the repository at this point in the history
  • Loading branch information
etu committed May 17, 2024
1 parent 7dae043 commit a7fc5b3
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion hosts/server-main-elis/services/home-nginx.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{config, ...}: {
{
config,
pkgs,
...
}: {
# Make sure to have nginx enabled
services.nginx.enable = true;
services.nginx.virtualHosts = {
Expand All @@ -11,6 +15,10 @@
locations."/" = {
extraConfig = "autoindex on;";
};
locations."/robots.txt".root = pkgs.writeTextDir "robots.txt" ''
User-agent: *
Disallow: /
'';
};
};
}

0 comments on commit a7fc5b3

Please sign in to comment.