View thesis.nix
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
{ pkgs ? import <nixpkgs> {} }: | |
let | |
fontsConf = pkgs.makeFontsConf { | |
fontDirectories = [ ./fonts ]; | |
}; | |
texlive = pkgs.texlive.combine { | |
inherit (pkgs.texlive) | |
appendix | |
tikzmark |
View main.go
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
package main | |
import ( | |
"context" | |
"fmt" | |
"log" | |
"net/http" | |
"time" | |
ct "github.com/google/certificate-transparency-go" |
View simplewebauthn.ts
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
interface SimpleCredential { | |
id: string; | |
publicKey: ArrayBuffer; | |
} | |
async function create(name: string) : Promise<SimpleCredential> { | |
// NOTE: We don't care about the challenge because we don't check attestation | |
const challenge = crypto.getRandomValues(new Uint8Array(16)); | |
let credential = await navigator.credentials.create({ | |
publicKey: { |
View main.go
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
package main | |
import ( | |
"crypto/ecdsa" | |
"crypto/elliptic" | |
"crypto/rand" | |
"crypto/subtle" | |
"crypto/x509" | |
"log" | |
"math/big" |
View gist:b64a910aa4226219ed52cbafc2ad1f0d
Nix.dev @zupo
All the commands in the nix.dev documentation are now checked by CI.
The problem is that we have nested shells; which default tooling for this doesn't work. It works on my machine. What left is polishing and adding it to CI
Nix code samples are extracted into a file such that e.g. following nix-build
calls can access those files.
So that we can check that the default.nix
in the document actually works.
View flake.nix
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
{ | |
description = "A flake that builds a go app and deploys to kubernetes"; | |
inputs = { | |
utils.url = "github:numtide/flake-utils"; | |
nixpkgs.url = "nixpkgs/nixpkgs-unstable"; | |
}; | |
outputs = { self, nixpkgs, utils }: utils.lib.eachDefaultSystem (system: | |
let |
View cni.conf
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
{ | |
"cniversion":"1.0.0", | |
"name":"kube", | |
"plugins": [ | |
{ | |
"type": "ptp", | |
"ipam": { | |
"type": "host-local", | |
"routes": [ { "dst": "::/0" } ], | |
"ranges": [ { "subnet": "2001:19f0:6c01:1f10::/80" } ] |
View boot.ipxe
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
#!ipxe | |
set STREAM stable | |
set VERSION 34.20210725.3.0 | |
set BASEURL https://builds.coreos.fedoraproject.org/prod/streams/${STREAM}/builds/${VERSION}/x86_64 | |
set NETWORK # ip=bond0:dhcp bond=bond0:enp0s20f0,enp0s20f1:mode=balance-tlb,downdelay=200,updelay=200,miimon=100 nameserver=8.8.8.8 | |
kernel ${BASEURL}/fedora-coreos-${VERSION}-live-kernel-x86_64 initrd=main ignition.platform.id=metal coreos.inst.install_dev=/dev/sda coreos.live.rootfs_url=${BASEURL}/fedora-coreos-${VERSION}-live-rootfs.x86_64.img ignition.firstboot coreos.inst.platform_id=packet console=ttyS1,115200n8 ${NETWORK} |
View cassdc.rs
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
use anyhow::{anyhow, Result}; | |
use futures::TryStreamExt; | |
use k8s_openapi::api::core::v1::{PersistentVolumeClaim, Pod}; | |
use kube::api::{Api, DeleteParams, ListParams, Patch, PatchParams}; | |
use kube::Client; | |
use kube::CustomResource; | |
use kube_runtime::utils::try_flatten_applied; | |
use kube_runtime::watcher; | |
use schemars::JsonSchema; | |
use serde::{Deserialize, Serialize}; |
NewerOlder