Add a Nix flake

This commit is contained in:
Ketan Vijayvargiya 2024-06-13 21:40:42 -07:00
parent f801aff248
commit 9a40fa7462
4 changed files with 75 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
result

View file

@ -9,6 +9,9 @@ This repository contains the code to manage all my DNS records.
docker run --rm -it \
-v "$HOME/app-data/dns-config:/dns" \
ghcr.io/stackexchange/dnscontrol preview
# OR:
nix run . -- version
nix run . -- preview
# Pull in changes from an existing DNS provider
docker run --rm -it \

58
flake.lock Normal file
View file

@ -0,0 +1,58 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"id": "flake-utils",
"type": "indirect"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1718149104,
"narHash": "sha256-Ds1QpobBX2yoUDx9ZruqVGJ/uQPgcXoYuobBguyKEh8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e913ae340076bbb73d9f4d3d065c2bca7caafb16",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

13
flake.nix Normal file
View file

@ -0,0 +1,13 @@
{
description = "Nix configuration for dns-config";
inputs = {};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in {
packages.default = nixpkgs.legacyPackages.${system}.dnscontrol;
});
}