2
0
Fork 0
mirror of git://git.savannah.gnu.org/guix/maintenance.git synced 2023-12-14 03:33:04 +01:00

hydra: Create an overdrive module.

* hydra/overdrive.scm: Turn it into a generic "overdrive" module.
* hydra/overdrive1.scm: New file.
This commit is contained in:
Mathieu Othacehe 2021-02-17 10:49:04 +01:00
parent aca88126a2
commit 901d88dfae
No known key found for this signature in database
GPG key ID: 8354763531769CA6
2 changed files with 100 additions and 72 deletions

View file

@ -1,10 +1,34 @@
;; GuixSD configuration file for the SoftIron OverDrive 1000 build machines.
;; Copyright © 2016, 2017, 2018, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;; Released under the GNU GPLv3 or any later version.
;;; SoftIron OverDrive 1000 build machines.
;;;
;;; Copyright © 2016, 2017, 2018, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2020, 2021 Mathieu Othacehe <othacehe@gnu.org>
;;;
;;; 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/>.
(use-modules (guix) (gnu))
(use-service-modules avahi cuirass networking mcron ssh vpn)
(use-package-modules screen ssh linux certs)
(define-module (overdrive)
#:use-module (gnu)
#:use-module (gnu packages screen)
#:use-module (gnu packages ssh)
#:use-module (gnu packages linux)
#:use-module (gnu packages certs)
#:use-module (gnu services avahi)
#:use-module (gnu services cuirass)
#:use-module (gnu services networking)
#:use-module (gnu services mcron)
#:use-module (gnu services ssh)
#:use-module (gnu services vpn)
#:export (overdrive-system))
(define (sysadmin name full-name)
(user-account
@ -52,77 +76,77 @@
(public-key "wOIfhHqQ+JQmskRS2qSvNRgZGh33UxFDi8uuSXOltF0=")
(allowed-ips '("10.0.0.1/32"))))
;; The actual machine.
(operating-system
(host-name "overdrive1")
(timezone "Europe/Paris")
(locale "en_US.UTF-8")
(define* (overdrive-system name #:key wireguard-ip)
(operating-system
(host-name name)
(timezone "Europe/Paris")
(locale "en_US.UTF-8")
(bootloader (bootloader-configuration
(bootloader grub-efi-bootloader)
(target "/boot/efi")))
(initrd-modules (cons* "xhci-pci" "ahci_platform" "sg" "sd_mod"
%base-initrd-modules))
(firmware '())
(file-systems (cons* (file-system
(device "/dev/sda3")
(mount-point "/")
(type "btrfs"))
(file-system
(device "/dev/sda1")
(mount-point "/boot/efi")
;; original options:
;; (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
(type "vfat"))
%base-file-systems))
(bootloader (bootloader-configuration
(bootloader grub-efi-bootloader)
(target "/boot/efi")))
(initrd-modules (cons* "xhci-pci" "ahci_platform" "sg" "sd_mod"
%base-initrd-modules))
(firmware '())
(file-systems (cons* (file-system
(device "/dev/sda3")
(mount-point "/")
(type "btrfs"))
(file-system
(device "/dev/sda1")
(mount-point "/boot/efi")
;; original options:
;; (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
(type "vfat"))
%base-file-systems))
(swap-devices '("/dev/sda4"))
(swap-devices '("/dev/sda4"))
(users (append %accounts %base-user-accounts))
(services
(cons* (service openssh-service-type
(openssh-configuration
(authorized-keys
`(("ludo" ,(local-file "keys/ssh/ludo.pub"))
("rekado" ,(local-file "keys/ssh/rekado.pub"))
("dannym" ,(local-file "keys/ssh/dannym.pub"))
("janneke" ,(local-file "keys/ssh/janneke.pub"))
("mathieu" ,(local-file "keys/ssh/mathieu.pub"))))))
(service avahi-service-type)
(service dhcp-client-service-type)
(service mcron-service-type
(mcron-configuration
(jobs (list gc-job btrfs-job))))
(users (append %accounts %base-user-accounts))
(services
(cons* (service openssh-service-type
(openssh-configuration
(authorized-keys
`(("ludo" ,(local-file "keys/ssh/ludo.pub"))
("rekado" ,(local-file "keys/ssh/rekado.pub"))
("dannym" ,(local-file "keys/ssh/dannym.pub"))
("janneke" ,(local-file "keys/ssh/janneke.pub"))
("mathieu" ,(local-file "keys/ssh/mathieu.pub"))))))
(service avahi-service-type)
(service dhcp-client-service-type)
(service mcron-service-type
(mcron-configuration
(jobs (list gc-job btrfs-job))))
(service agetty-service-type
(agetty-configuration
(tty "ttyAMA0")
(keep-baud? #t)
(term "vt220")
(baud-rate "115200,38400,9600")))
(service cuirass-remote-worker-service-type
(cuirass-remote-worker-configuration
(workers 2)
(server "10.0.0.1:5555") ;berlin
(systems '("armhf-linux" "aarch64-linux"))))
(service wireguard-service-type
(wireguard-configuration
(addresses '("10.0.0.3/32"))
(peers
(list berlin-peer))))
(service agetty-service-type
(agetty-configuration
(tty "ttyAMA0")
(keep-baud? #t)
(term "vt220")
(baud-rate "115200,38400,9600")))
(service cuirass-remote-worker-service-type
(cuirass-remote-worker-configuration
(workers 2)
(server "10.0.0.1:5555") ;berlin
(systems '("armhf-linux" "aarch64-linux"))))
(service wireguard-service-type
(wireguard-configuration
(addresses (list wireguard-ip))
(peers
(list berlin-peer))))
(service ntp-service-type)
(service ntp-service-type)
(modify-services %base-services
(guix-service-type config =>
(guix-configuration
(inherit config)
(max-silent-time 7200)
(authorized-keys
%authorized-guix-keys)
(extra-options
'("--max-jobs=2" "--cores=3")))))))
(modify-services %base-services
(guix-service-type config =>
(guix-configuration
(inherit config)
(max-silent-time 7200)
(authorized-keys
%authorized-guix-keys)
(extra-options
'("--max-jobs=2" "--cores=3")))))))
(packages (cons* btrfs-progs screen openssh strace nss-certs
%base-packages)))
(packages (cons* btrfs-progs screen openssh strace nss-certs
%base-packages))))

4
hydra/overdrive1.scm Normal file
View file

@ -0,0 +1,4 @@
(use-modules (overdrive))
(overdrive-system "overdrive1"
#:wireguard-ip "10.0.0.3/32")