[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: hydra: Create an overdrive module.
From: |
Mathieu Othacehe |
Subject: |
branch master updated: hydra: Create an overdrive module. |
Date: |
Wed, 17 Feb 2021 04:49:47 -0500 |
This is an automated email from the git hooks/post-receive script.
mothacehe pushed a commit to branch master
in repository maintenance.
The following commit(s) were added to refs/heads/master by this push:
new 901d88d hydra: Create an overdrive module.
901d88d is described below
commit 901d88dfaee6cb802bd6d25c71895087e9d9b497
Author: Mathieu Othacehe <othacehe@gnu.org>
AuthorDate: Wed Feb 17 10:49:04 2021 +0100
hydra: Create an overdrive module.
* hydra/overdrive.scm: Turn it into a generic "overdrive" module.
* hydra/overdrive1.scm: New file.
---
hydra/overdrive.scm | 186 +++++++++++++++++++++++++++++----------------------
hydra/overdrive1.scm | 4 ++
2 files changed, 109 insertions(+), 81 deletions(-)
diff --git a/hydra/overdrive.scm b/hydra/overdrive.scm
index ca9c105..27d1c68 100644
--- a/hydra/overdrive.scm
+++ b/hydra/overdrive.scm
@@ -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.
-
-(use-modules (guix) (gnu))
-(use-service-modules avahi cuirass networking mcron ssh vpn)
-(use-package-modules screen ssh linux certs)
+;;; 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/>.
+
+(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")
-
- (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"))
-
- (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 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")))))))
-
- (packages (cons* btrfs-progs screen openssh strace nss-certs
- %base-packages)))
+
+(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))
+
+ (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))))
+
+ (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)
+
+ (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))))
diff --git a/hydra/overdrive1.scm b/hydra/overdrive1.scm
new file mode 100644
index 0000000..89502af
--- /dev/null
+++ b/hydra/overdrive1.scm
@@ -0,0 +1,4 @@
+(use-modules (overdrive))
+
+(overdrive-system "overdrive1"
+ #:wireguard-ip "10.0.0.3/32")
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: hydra: Create an overdrive module.,
Mathieu Othacehe <=