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 January 24, 2023 07:43
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 June 19, 2024 13:58
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