mirror of
https://github.com/partofmyid/register.git
synced 2026-06-05 18:46:50 +07:00
style: formatting with nixfmt
This commit is contained in:
parent
a97ad1b804
commit
08350def49
31 changed files with 143 additions and 240 deletions
61
flake.nix
61
flake.nix
|
|
@ -2,32 +2,37 @@
|
|||
description = "Zone File Generator";
|
||||
inputs.dns.url = "github:nix-community/dns.nix";
|
||||
|
||||
outputs = { dns, ... }: let
|
||||
email = "admin@satr14.my.id";
|
||||
domains."0" = {
|
||||
domain = "part-of.my.id";
|
||||
nameservers = [
|
||||
"adele.ns.cloudflare.com"
|
||||
"fattouche.ns.cloudflare.com"
|
||||
];
|
||||
outputs =
|
||||
{ dns, ... }:
|
||||
let
|
||||
email = "admin@satr14.my.id";
|
||||
domains."0" = {
|
||||
domain = "part-of.my.id";
|
||||
nameservers = [
|
||||
"adele.ns.cloudflare.com"
|
||||
"fattouche.ns.cloudflare.com"
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
packages.x86_64-linux = builtins.mapAttrs (
|
||||
_: domain:
|
||||
dns.util.x86_64-linux.writeZone domain.domain (
|
||||
with dns.lib.combinators;
|
||||
{
|
||||
SOA = {
|
||||
adminEmail = email;
|
||||
nameServer = builtins.head domain.nameservers;
|
||||
serial = builtins.currentTime;
|
||||
};
|
||||
NS = domain.nameservers;
|
||||
|
||||
# note: Cloudflare ignores SOA and NS records uploaded via Zone File, they are included just so that dns.nix builds a valid zone file.
|
||||
|
||||
#subdomains = ;
|
||||
# ^^ todo: implement file imports from ./domains
|
||||
}
|
||||
)
|
||||
) domains;
|
||||
};
|
||||
in {
|
||||
packages.x86_64-linux = builtins.mapAttrs (_: domain:
|
||||
dns.util.x86_64-linux.writeZone domain.domain (
|
||||
with dns.lib.combinators; {
|
||||
SOA = {
|
||||
adminEmail = email;
|
||||
nameServer = builtins.head domain.nameservers;
|
||||
serial = builtins.currentTime;
|
||||
};
|
||||
NS = domain.nameservers;
|
||||
|
||||
# note: Cloudflare ignores SOA and NS records uploaded via Zone File, they are included just so that dns.nix builds a valid zone file.
|
||||
|
||||
#subdomains = ;
|
||||
# ^^ todo: implement file imports from ./domains
|
||||
}
|
||||
)
|
||||
) domains;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue