[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/02: hydra: Add configuration for the OverDrive 1000.
From: |
Ludovic Courtès |
Subject: |
02/02: hydra: Add configuration for the OverDrive 1000. |
Date: |
Fri, 19 Oct 2018 17:55:39 -0400 (EDT) |
civodul pushed a commit to branch master
in repository maintenance.
commit 2222eeeee53d8e9e7da34f01e8f7ef80479ec145
Author: Ludovic Courtès <address@hidden>
Date: Wed Oct 17 10:22:24 2018 +0200
hydra: Add configuration for the OverDrive 1000.
Tested with Guix commit
0ee6692a63538e874ba0b4d85584a4a73b75367c (Linux-libre 4.18.15,
GRUB 2.02).
* hydra/overdrive.scm: New file.
---
hydra/overdrive.scm | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 100 insertions(+)
diff --git a/hydra/overdrive.scm b/hydra/overdrive.scm
new file mode 100644
index 0000000..072c095
--- /dev/null
+++ b/hydra/overdrive.scm
@@ -0,0 +1,100 @@
+;; GuixSD configuration file for the SoftIron OverDrive 1000 build machines.
+;; Copyright © 2016, 2017, 2018 Ludovic Courtès <address@hidden>
+;; Released under the GNU GPLv3 or any later version.
+
+(use-modules (guix) (gnu))
+(use-service-modules networking mcron ssh)
+(use-package-modules screen ssh linux)
+
+(define (sysadmin name full-name)
+ (user-account
+ (name name)
+ (comment full-name)
+ (group "users")
+ (supplementary-groups '("wheel" "kvm"))
+ (home-directory (string-append "/home/" name))))
+
+(define %accounts
+ (list (sysadmin "ludo" "Ludovic Courtès")
+ (sysadmin "rekado" "Ricardo Wurmus")
+ (sysadmin "dannym" "Danny Milosavljevic")
+ (user-account
+ (name "hydra")
+ (comment "Hydra User")
+ (group "users")
+ (home-directory (string-append "/home/" name)))))
+
+(define %authorized-guix-keys
+ ;; List of authorized 'guix archive' keys.
+ (list (local-file "keys/guix/berlin.guixsd.org-export.pub")))
+
+(define gc-job
+ ;; Run 'guix gc' at 3AM every day.
+ #~(job '(next-hour '(3)) "guix gc -F 50G"))
+
+(define btrfs-job
+ ;; Run 'btrfs balance' every three days to make free space.
+ #~(job (lambda (now)
+ (next-day-from now (range 1 31 3)))
+ (string-append #$btrfs-progs "/bin/btrfs balance "
+ "start -dusage=50 -musage=70 /")))
+
+;; 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))
+ (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"))))))
+ (dhcp-client-service)
+ (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")))
+
+ (ntp-service)
+
+ (modify-services %base-services
+ (guix-service-type config =>
+ (guix-configuration
+ (inherit config)
+ (use-substitutes? #f)
+ (max-silent-time 7200)
+ (authorized-keys
+ %authorized-guix-keys)
+ (extra-options
+ '("--max-jobs=2" "--cores=3")))))))
+
+ (packages (cons* screen openssh strace %base-packages)))