This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
# Wrap a nginx server block in an HTTPS site | |
wrapSSL = site: cert: key: block: '' | |
server { | |
listen 80; | |
listen [::]:80; | |
server_name ${site}; | |
location /nginx_status { | |
stub_status on; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this example adds an option `.tomcatProxy` in namespace | |
# services.nginx.virtualHosts.*.locations.* | |
# that acts as alternative to specifying actual nginx config in .extraConfig | |
# | |
# execute with | |
/* | |
cat $(grep -o "/nix/store/[a-z0-9]*-nginx.conf" \ | |
$(NIX_PATH=nixos-config=./example.nix:$NIX_PATH \ | |
nix-build --no-out-link -E ' | |
with import <nixpkgs/nixos> {}; |