Initial flake setup

This commit is contained in:
2025-02-17 21:45:17 +01:00
commit 7cd1b27cfc
3 changed files with 118 additions and 0 deletions

77
flake.lock generated Normal file
View File

@@ -0,0 +1,77 @@
{
"nodes": {
"dns": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1737653493,
"narHash": "sha256-qTbv8Pm9WWF63M5Fj0Od9E54/lsbMSQUBHw/s30eFok=",
"owner": "nix-community",
"repo": "dns.nix",
"rev": "96e548ae8bd44883afc5bddb9dacd0502542276d",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "dns.nix",
"type": "github"
}
},
"flake-utils": {
"locked": {
"lastModified": 1614513358,
"narHash": "sha256-LakhOx3S1dRjnh0b5Dg3mbZyH0ToC9I8Y2wKSkBaTzU=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5466c5bbece17adaab2d82fae80b46e807611bf3",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1616989418,
"narHash": "sha256-LcOn5wHR/1JwClfY/Ai/b+pSRY+d23QtIPQHwPAyHHI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9d8e05e088ad91b7c62886a2175f38bfa443db2c",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1739776882,
"narHash": "sha256-PAiogZP1rLOwSkoL8eNgnbcobe5AqIq+Zc8A9NNFv+A=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "1ead14e49dfa47e91e68df64ef3dbf036809c742",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable-small",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"dns": "dns",
"nixpkgs": "nixpkgs_2"
}
}
},
"root": "root",
"version": 7
}

27
flake.nix Normal file
View File

@@ -0,0 +1,27 @@
{
description = "Nyota - PVV DNS";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small";
dns.url = "github:nix-community/dns.nix";
};
outputs = { nixpkgs, dns, ... }@inputs:
let
inherit (nixpkgs) lib;
systems = [
"x86_64-linux"
"aarch64-linux"
"aarch64-darwin"
];
forAllSystems = f: lib.genAttrs systems f;
in {
packages = forAllSystems (system: rec {
zoneConfig = nixpkgs.legacyPackages.${system}.callPackage ./zoneConfig.nix {
inherit dns;
};
default = zoneConfig;
});
};
}

14
zoneConfig.nix Normal file
View File

@@ -0,0 +1,14 @@
{
lib,
stdenvNoCC,
dns,
}:
stdenvNoCC.mkDerivation {
name = "zoneConfig";
dontUnpack = true;
installPhase = ''
mkdir $out
'';
}