Skip to content

Instantly share code, notes, and snippets.

View zimbatm's full-sized avatar
🦙
nixified

Jonas Chevalier zimbatm

🦙
nixified
View GitHub Profile
{ pkgs, ... }:
let
domain = "upterm.numtide.com";
upterm-client = import ./upterm-client/BUILD.nix {
inherit pkgs;
};
in
{
services.uptermd = {
@zimbatm
zimbatm / README.md
Created March 29, 2017 09:32
Nixpkgs pinning example

Nixpkgs pinning example

This is an example of how to pin the version of nixpkgs in a package repo. The goal is to improve reproducibility, make sure all the developers use the same version of nixpkgs and also allow to share binary caches.

Usage

Put all these files in a nixpkgs folder and then in other derivations, instead of import <nixpkgs> {} use import ./path/to/nixpkgs {}

Keeping nixpkgs up to date

data "aws_vpc" "default" {
default = true
}
data "aws_subnet_ids" "default" {
vpc_id = data.aws_vpc.default.id
}
data "terraform_remote_state" "main" {
backend = "s3"
on:
push:
branches:
- master
pull_request:
name: CI
env:
SCCACHE_IDLE_TIMEOUT: '0'
{ config, pkgs, ... }:
{
# Configure nix to upload build results to the cache
nix.extraOptions =
let
post-build-hook = pkgs.writeShellScript "post-build-hook" ''
#
# Invoked by post-build hooks to upload new builds to the cache
#
set -euo pipefail
apiVersion: v1
kind: Pod
metadata:
name: zimbatm-debug-container-flannel
namespace: default
spec:
containers:
- command:
- sleep
- infinity
# Fetch the latest NixOS AMI from 20.03
module "nixos_image" {
source = "git@github.com:tweag/terraform-nixos.git//aws_image_nixos?ref=43cbf822c07e705c66fb6d719ab58ed9cb05f87d"
release = "20.09"
}
data "external" "local_info" {
program = ["${path.module}/get_local_info.sh"]
}
variable "honeycomb_dataset" {}
variable "honeycomb_api_key" { default = "1ae3cea44e0026bf01627c6bab6f5227" }
variable "region" {}
resource "helm_release" "opentelemetry_collector" {
atomic = true
chart = "opentelemetry-collector"
name = "opentelemetry-collector"
repository = "https://open-telemetry.github.io/opentelemetry-helm-charts"
verify = false
module "opentelemetry-collector" {
source = "../../terraform-modules/opentelemetry-collector"
honeycomb_dataset = local.honeycomb_dataset
region = local.aws_region
}
#!/usr/bin/env bash
# Dump all the schemas from the registry $scr to $dir
set -euo pipefail
scr=${1:-localhost:8081}
dir=${2:-$PWD}
curl -s "${scr}/subjects" | jq -r .[] | while read -r subject; do
curl -s "${scr}/subjects/${subject}/versions" | jq -r .[] | while read -r version; do
# get the schema for a subject and version to a file