Files
PVV-DNS/flake.nix
T
oysteikt 75457ae427
Build and test / build (pull_request) Successful in 47s
Build and test / test (pull_request) Successful in 20s
Build and test / deploy (pull_request) Has been skipped
Build and test / build (push) Successful in 47s
Build and test / test (push) Successful in 20s
Build and test / deploy (push) Successful in 21s
nsd.conf.nix: use mkDerivation to get proper build logs
2026-05-26 00:29:05 +09:00

47 lines
1.3 KiB
Nix

{
description = "PVV-DNS";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small";
# Broken, wait for https://github.com/nix-community/dns.nix/pull/52
#dns.url = "github:nix-community/dns.nix";
dns.url = "github:felixalbrigtsen/dns.nix";
dns.inputs.nixpkgs.follows = "nixpkgs";
};
outputs =
{ self, nixpkgs, dns, ... }@inputs:
let
inherit (nixpkgs) lib;
systems = [
"x86_64-linux"
"aarch64-linux"
"aarch64-darwin"
];
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system nixpkgs.legacyPackages.${system});
in
{
packages = forAllSystems (system: pkgs: rec {
zoneFiles = pkgs.callPackage ./zoneConfig.nix {
inherit dns;
};
nsdConfig = pkgs.callPackage ./nsd.conf.nix { };
default = pkgs.runCommand "pvv-dns" { } ''
mkdir -p $out/zones
mkdir -p $out/etc/nsd
cp -r ${zoneFiles}/* $out/zones/
cp -r ${nsdConfig} $out/etc/nsd/nsd.conf
'';
});
checks = forAllSystems (system: _: rec {
zoneFiles = self.packages.${system}.zoneFiles.overrideAttrs { doCheck = true; };
nsdConfig = self.packages.${system}.nsdConfig.overrideAttrs { doCheck = true; };
});
};
}