unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob 8ce93e646e9d0618661adc8ab21f4300f4bc5d9e 2578 bytes (raw)
name: hydra/modules/sysadmin/dns.scm 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
 
;;; GNU Guix system administration tools.
;;;
;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu>
;;;
;;; This program is free software: you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
;;; the Free Software Foundation, either version 3 of the License, or
;;; (at your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful,
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program.  If not, see <http://www.gnu.org/licenses/>.

(define-module (sysadmin dns)
  #:use-module (gnu services knot)
  #:export (guix.gnu.org-zone
            berlin-ip4
            bayfront-ip4))

;;; Commentary:
;;;
;;; DNS configuration.
;;;
;;; For any change in the zone (an IP, a new record, ...), increment the
;;; the serial in the zone configuration. This is very important for
;;; changes to be taken into account.
;;;
;;; Remember some DNS rules: no other kind of record for a CNAME record.
;;; Always associate a name that resolves to an A or an AAAA record
;;; immediately (it cannot be a CNAME).  Same for MX.
;;;
;;; Remember that data is relative to the root of this zone when it
;;; reference another domain name, unless it ends with a dot.
;;;
;;; Ex: "ns1.guix.gnu.org" actually means "ns1.guix.gnu.org.guix.gnu.org"
;;; whereas "ns1.guix.gnu.org." means what it says.
;;;
;;; Code:

;; Define some IP addresses for easier use later
(define gnu.org-ip4 "209.51.188.148")
(define gnu.org-ip6 "2001:470:142:3::a")
(define hydra-ip4 "18.4.89.46")
(define bayfront-ip4 "185.233.100.56")
(define berlin-ip4 "141.80.181.40")

(define-zone-entries guix.gnu.org.zone
;; Name       TTL Class Type Data
  ("@"        ""  "IN"  "A"      gnu.org-ip4)
  ("@"        ""  "IN"  "AAAA"   gnu.org-ip6)
  ("@"        ""  "IN"  "NS"     "ns1")
  ("@"        ""  "IN"  "NS"     "ns2")
  ("ns1"      ""  "IN"  "A"      bayfront-ip4)
  ("ns2"      ""  "IN"  "A"      berlin-ip4)
  ("hydra"    ""  "IN"  "A"      hydra-ip4)
  ("berlin"   ""  "IN"  "A"      berlin-ip4)
  ("bayfront" ""  "IN"  "A"      bayfront-ip4)
  ("ci"       ""  "IN"  "CNAME"  "berlin"))

(define guix.gnu.org-zone
  (knot-zone-configuration
    (domain "guix.gnu.org")
    (zone (zone-file
            (origin "guix.gnu.org")
            (entries guix.gnu.org.zone)
            (serial 1)))))

debug log:

solving 8ce93e6 ...
found 8ce93e6 in https://yhetil.org/guix-devel/20190304223229.2a239785@lepiller.eu/

applying [1/1] https://yhetil.org/guix-devel/20190304223229.2a239785@lepiller.eu/
diff --git a/hydra/modules/sysadmin/dns.scm b/hydra/modules/sysadmin/dns.scm
new file mode 100644
index 0000000..8ce93e6

Checking patch hydra/modules/sysadmin/dns.scm...
Applied patch hydra/modules/sysadmin/dns.scm cleanly.

index at:
100644 8ce93e646e9d0618661adc8ab21f4300f4bc5d9e	hydra/modules/sysadmin/dns.scm

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).