Skip to content

Commit

Permalink
country list
Browse files Browse the repository at this point in the history
  • Loading branch information
MayNiklas committed Jan 29, 2025
1 parent a0bd067 commit e1d5b99
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions modules/geo-ip/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,15 @@ let cfg = config.lounge-rocks.nginx; in
"2a0a:a440::/29"
"2606:50c0::/32"
];
allowed_countries = [
"DE"
"ES"
"FR"
"GB"
"IT"
"NL"
"TH"
];
in
toString (
[
Expand All @@ -65,13 +74,7 @@ let cfg = config.lounge-rocks.nginx; in
''
map $geoip2_data_country_iso_code $allowed_country {
default no;
DE yes;
ES yes;
FR yes;
GB yes;
IT yes;
NL yes;
TH yes;
${lib.concatStringsSep "\n" (map (country: "${country} yes;") allowed_countries)}
}
''
# we want to allow requests comming from GitHub IPs
Expand Down

0 comments on commit e1d5b99

Please sign in to comment.