Skip to content

Instantly share code, notes, and snippets.

View maxmoehl's full-sized avatar

Maximilian Moehl maxmoehl

View GitHub Profile
@maxmoehl
maxmoehl / flake.nix
Last active July 25, 2024 02:40
A minimal base for building multi-arch, multi-os nix flakes
{
inputs.nixpkgs.url = github:NixOS/nixpkgs/nixos-22.11;
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
in
{
@maxmoehl
maxmoehl / gitCommitLabel.yml
Last active September 4, 2024 09:24
Add the git commit hash to all resources. Due to a bug in kustomize the script will have to be in your path for this to work. Once the bug is fixed it should be possible to have the script relative to the kustomization file.
apiVersion: internal
kind: GitCommitLabel
metadata:
name: whatever
annotations:
config.kubernetes.io/function: |
exec:
path: git_commit_label.sh