mirror of
https://github.com/Noratrieb/vps.git
synced 2026-01-14 16:55:00 +01:00
fixes
This commit is contained in:
parent
8d0c65448a
commit
6b192fd994
3 changed files with 7 additions and 4 deletions
|
|
@ -32,7 +32,7 @@
|
||||||
file: ${import ./noratrieb.dev.nix { inherit pkgs lib networkingConfig; }}
|
file: ${import ./noratrieb.dev.nix { inherit pkgs lib networkingConfig; }}
|
||||||
- domain: nilstrieb.dev
|
- domain: nilstrieb.dev
|
||||||
storage: /var/lib/knot/zones/
|
storage: /var/lib/knot/zones/
|
||||||
file: ${import ./nilstrieb.dev.nix { inherit pkgs lib; }}
|
file: ${import ./nilstrieb.dev.nix { inherit pkgs lib networkingConfig; }}
|
||||||
log:
|
log:
|
||||||
- target: syslog
|
- target: syslog
|
||||||
any: info
|
any: info
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,17 @@
|
||||||
# https://github.com/nix-community/dns.nix
|
# https://github.com/nix-community/dns.nix
|
||||||
{ pkgs, lib, ... }:
|
{ pkgs, lib, networkingConfig, ... }:
|
||||||
let
|
let
|
||||||
data = with pkgs.nix-dns.lib.combinators;
|
data = with pkgs.nix-dns.lib.combinators;
|
||||||
let
|
let
|
||||||
hour1 = 3600;
|
hour1 = 3600;
|
||||||
hostsToDns = builtins.mapAttrs
|
hostsToDns = builtins.mapAttrs
|
||||||
(name: { publicIPv4, publicIPv6 }:
|
(name: { publicIPv4, publicIPv6, ... }:
|
||||||
lib.optionalAttrs (publicIPv4 != null) { A = [ (ttl hour1 (a publicIPv4)) ]; } //
|
lib.optionalAttrs (publicIPv4 != null) { A = [ (ttl hour1 (a publicIPv4)) ]; } //
|
||||||
lib.optionalAttrs (publicIPv6 != null) { AAAA = [ (ttl hour1 (aaaa publicIPv6)) ]; })
|
lib.optionalAttrs (publicIPv6 != null) { AAAA = [ (ttl hour1 (aaaa publicIPv6)) ]; })
|
||||||
networkingConfig;
|
networkingConfig;
|
||||||
|
vps2 = {
|
||||||
|
A = [ "184.174.32.252" ];
|
||||||
|
};
|
||||||
in
|
in
|
||||||
with hostsToDns;
|
with hostsToDns;
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ let
|
||||||
let
|
let
|
||||||
hour1 = 3600;
|
hour1 = 3600;
|
||||||
hostsToDns = builtins.mapAttrs
|
hostsToDns = builtins.mapAttrs
|
||||||
(name: { publicIPv4, publicIPv6 }:
|
(name: { publicIPv4, publicIPv6, ... }:
|
||||||
lib.optionalAttrs (publicIPv4 != null) { A = [ (ttl hour1 (a publicIPv4)) ]; } //
|
lib.optionalAttrs (publicIPv4 != null) { A = [ (ttl hour1 (a publicIPv4)) ]; } //
|
||||||
lib.optionalAttrs (publicIPv6 != null) { AAAA = [ (ttl hour1 (aaaa publicIPv6)) ]; })
|
lib.optionalAttrs (publicIPv6 != null) { AAAA = [ (ttl hour1 (aaaa publicIPv6)) ]; })
|
||||||
networkingConfig;
|
networkingConfig;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue