From 6bb0221b270bf8a54c4efe646e8ec39d74e55f9f Mon Sep 17 00:00:00 2001 From: greyweather Date: Sat, 29 Aug 2026 16:09:49 +0100 Subject: [PATCH] Add instructions to README.md --- README.md | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c783267..1cbce04 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,25 @@ -# nix-helper-flake +### nix-helper-flake +A simple flake that provides some basic helper functions as top-level outputs. + +#### Usage: +flake.nix +``` +{ + inputs = { + ... + + helpers = { + url = "git+https://git.greyweather.dev/greyweather/nix-helper-flake"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; +} +``` + +Then in any module access functions with `inputs.helpers.`, e.g. +``` +{ inputs, config, ... }: { + time.timeZone = inputs.helpers.mkIfElse (config.networking.hostName == "zohran") "America/New_York" "Europe/London"; +} +``` \ No newline at end of file