ene.scm
1 | ;;; Tyreunom's system administration and configuration tools. |
2 | ;;; |
3 | ;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu> |
4 | ;;; |
5 | ;;; This program is free software: you can redistribute it and/or modify |
6 | ;;; it under the terms of the GNU General Public License as published by |
7 | ;;; the Free Software Foundation, either version 3 of the License, or |
8 | ;;; (at your option) any later version. |
9 | ;;; |
10 | ;;; This program is distributed in the hope that it will be useful, |
11 | ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | ;;; GNU General Public License for more details. |
14 | ;;; |
15 | ;;; You should have received a copy of the GNU General Public License |
16 | ;;; along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | |
18 | (use-modules (gnu)) |
19 | (use-modules (gnu system)) |
20 | (use-modules (gnu bootloader)) |
21 | (use-modules (gnu services dns)) |
22 | (use-modules (gnu services web)) |
23 | (use-modules (config certbot) (config dns) (config mail) (config network) (config os)) |
24 | |
25 | (define u-boot-allwinner-bootloader (@@ (gnu bootloader u-boot) u-boot-allwinner-bootloader)) |
26 | |
27 | (define u-boot-cibietruck-bootloader |
28 | (bootloader |
29 | (inherit u-boot-allwinner-bootloader) |
30 | (package u-boot-cubietruck))) |
31 | |
32 | (operating-system |
33 | (inherit (tyreunom-os "ene")) |
34 | (bootloader |
35 | (bootloader-configuration |
36 | (target "/dev/mmcblk0") |
37 | (bootloader u-boot-cubietruck-bootloader))) |
38 | (initrd-modules (cons "sunxi-mmc" %base-initrd-modules)) |
39 | (file-systems (cons (file-system |
40 | (mount-point "/") |
41 | (device "/dev/sda1") |
42 | (type "ext4")) |
43 | %base-file-systems)) |
44 | (services |
45 | (append |
46 | (list |
47 | (service dhcp-client-service-type) |
48 | (agetty-service |
49 | (agetty-configuration |
50 | (extra-options '("-L")) |
51 | (baud-rate "115200") |
52 | (term "vt100") |
53 | (tty "ttyS0"))) |
54 | (service nginx-service-type) |
55 | (service knot-service-type |
56 | (knot-configuration |
57 | (zones (list lepiller-master-zone |
58 | ipv4-reverse-master-zone |
59 | ipv6-reverse-master-zone)))) |
60 | (certbot-service `(("courriel.lepiller.eu") |
61 | ("ene.lepiller.eu" "rennes.lepiller.eu") |
62 | ("avatar.lepiller.eu"))) |
63 | (cat-avatar-generator-service |
64 | #:configuration |
65 | (nginx-server-configuration |
66 | (server-name '("avatar.lepiller.eu")) |
67 | (ssl-certificate "/etc/letsencrypt/live/avatar.lepiller.eu/fullchain.pem") |
68 | (ssl-certificate-key "/etc/letsencrypt/live/avatar.lepiller.eu/privkey.pem") |
69 | (listen '("443 ssl http2" "[::]:443 ssl http2")))) |
70 | (simple-service 'default-http-server nginx-service-type |
71 | (list (nginx-server-configuration |
72 | (ssl-certificate "/etc/letsencrypt/live/lepiller.eu/fullchain.pem") |
73 | (ssl-certificate-key "/etc/letsencrypt/live/lepiller.eu/privkey.pem") |
74 | (listen '("443 ssl http2" "[::]:443 ssl http2")) |
75 | (server-name '(default))(root "/srv/http/default"))))) |
76 | lepiller-mail-services |
77 | (server-services "ene")))) |
78 |