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 January 18, 2025 10:45
IP address arithmetic and validation in Nix
{ lib ? null, ... }:
let
net = {
ip = {
# add :: (ip | mac | integer) -> ip -> ip
#
# Examples: