Skip to content

Instantly share code, notes, and snippets.

View oddlama's full-sized avatar
🦙

oddlama oddlama

🦙
View GitHub Profile
@duairc
duairc / net.nix
Last active May 8, 2025 09:27
IP address arithmetic and validation in Nix
{ lib ? null, ... }:
let
net = {
ip = {
# add :: (ip | mac | integer) -> ip -> ip
#
# Examples: