Skip to content

Instantly share code, notes, and snippets.

View jonringer's full-sized avatar
💭
😃

Jonathan Ringer jonringer

💭
😃
View GitHub Profile
@danbst
danbst / example.nix
Created April 8, 2017 07:07
Extending NixOS submodules
# 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> {};
@thoughtpolice
thoughtpolice / snake-nginx.nix
Created August 21, 2015 19:03
A complete example of a working Hydra build machine and other stuff.
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;