all repos — dns @ 3812a8777211d4bc800c6d254d62dc0a73dbf177

DNS records for my domains, managed via dnscontrol

pin nixpkgs and thus dnscontrol via lon

Alin
commit

3812a8777211d4bc800c6d254d62dc0a73dbf177

parent

fd071dcc22819a2dbee1ed3f4c439343f5b53260

3 files changed, 76 insertions(+), 1 deletion(-)

changed files
A lon.lock
@@ -0,0 +1,15 @@
+{ + "version": "1", + "sources": { + "nixpkgs": { + "type": "GitHub", + "fetchType": "tarball", + "owner": "nixos", + "repo": "nixpkgs", + "branch": "nixpkgs-unstable", + "revision": "d233902339c02a9c334e7e593de68855ad26c4cb", + "url": "https://github.com/nixos/nixpkgs/archive/d233902339c02a9c334e7e593de68855ad26c4cb.tar.gz", + "hash": "sha256-30sZNZoA1cqF5JNO9fVX+wgiQYjB7HJqqJ4ztCDeBZE=" + } + } +}
A lon.nix
@@ -0,0 +1,53 @@
+# Generated by lon. Do not modify! +let + + lock = builtins.fromJSON (builtins.readFile ./lon.lock); + + # Override with a path defined in an environment variable. If no variable is + # set, the original path is used. + overrideFromEnv = + name: path: + let + replacement = builtins.getEnv "LON_OVERRIDE_${name}"; + in + if replacement == "" then + path + else + # this turns the string into an actual Nix path (for both absolute and + # relative paths) + if builtins.substring 0 1 replacement == "/" then + /. + replacement + else + /. + builtins.getEnv "PWD" + "/${replacement}"; + + fetchSource = + args@{ fetchType, ... }: + if fetchType == "git" then + builtins.fetchGit ( + { + url = args.url; + ref = args.branch; + rev = args.revision; + narHash = args.hash; + submodules = args.submodules; + } + // ( + if args ? lastModified then + { + inherit (args) lastModified; + shallow = true; + } + else + { } + ) + ) + else if fetchType == "tarball" then + builtins.fetchTarball { + url = args.url; + sha256 = args.hash; + } + else + builtins.throw "Unsupported source type ${fetchType}"; + +in +builtins.mapAttrs (name: args: overrideFromEnv name (fetchSource args)) lock.sources
M shell.nixshell.nix
@@ -1,5 +1,11 @@
{ - pkgs ? (import <nixpkgs> { }), + pkgs ? ( + let + sources = import ./lon.nix; + pkgs = import sources.nixpkgs { }; + in + pkgs + ), lib ? pkgs.lib, }: let
@@ -19,6 +25,7 @@ '';
in pkgs.mkShellNoCC { packages = with pkgs; [ + lon dnscontrol prettier