Skip to content

Instantly share code, notes, and snippets.

View imincik's full-sized avatar

Ivan Mincik imincik

View GitHub Profile
@roberth
roberth / minimod.nix
Last active June 11, 2025 07:24
Simple and quick module system alternative + thoughts and tasks
/*
minimod: A stripped down module system
TODO Comparison:
- [ ] Come up with a benchmark "logic" using plain old functions and let bindings
- [ ] Write the benchmark for the module system
- [ ] Write the benchmark for POP?
- [ ] Qualitative comparison of extensibility in the context of composable
Nixpkgs packaging logic
TODO Fine-tuning:
@jeremiehuchet
jeremiehuchet / fetchDocker.nix
Created April 25, 2020 21:40
nix function to fetch docker image content
{ pkgs }:
{
# fetch docker image content and return path in nix store
# inspired from https://github.com/NixOS/nixpkgs/blob/6dab1b50a63fa6e9dfb9bd9eddd3f5d5c7b055ef/pkgs/build-support/docker/default.nix#L264
fetchDocker = coordinates:
let
name = "${coordinates.finalImageName}-${coordinates.finalImageTag}";
result = pkgs.dockerTools.runWithOverlay {
name = "docker-exporter-${name}";
@adisbladis
adisbladis / podman-shell.nix
Last active June 19, 2025 14:36
Use podman within a nix-shell
{ pkgs ? import <nixpkgs> {} }:
let
# To use this shell.nix on NixOS your user needs to be configured as such:
# users.extraUsers.adisbladis = {
# subUidRanges = [{ startUid = 100000; count = 65536; }];
# subGidRanges = [{ startGid = 100000; count = 65536; }];
# };
@hieblmedia
hieblmedia / .gitignore
Last active June 17, 2025 18:20
Gitignore - Exclude all except specific subdirectory
#
# If all files excluded and you will include only specific sub-directories
# the parent path must matched before.
#
/**
!/.gitignore
###############################
# Un-ignore the affected subdirectory