2
0
Fork 0
mirror of git://git.savannah.gnu.org/guix/maintenance.git synced 2023-12-14 03:33:04 +01:00
maintenance/hydra/monokuma.scm
Maxim Cournoyer 7607878239
Replace execl with system* in mcron jobs.
Using execl causes the run-job mcron forked guile process to be
hijacked and the lost of some output annotation.

* doc/infra-handbook.org (Btrfs balance mcron job): Replace execl with
system* and drop first argument.
* hydra/berlin.scm (btrfs-balance-job): Likewise.
* hydra/deploy-node-129.scm (btrfs-balance-job): Likewise.
* hydra/milano-guix-1.scm (btrfs-balance-job): Likewise.
* hydra/modules/sysadmin/overdrive.scm (btrfs-balance-job): Likewise.
* hydra/monokuma.scm (btrfs-balance-job): Likewise.
2022-11-28 22:37:11 -05:00

131 lines
5.7 KiB
Scheme

;; GuixSD configuration file for the SoftIron OverDrive 1000 build machines.
;; Copyright © 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
;; Released under the GNU GPLv3 or any later version.
(use-modules (guix) (gnu))
(use-service-modules networking mcron ssh monitoring guix)
(use-package-modules screen ssh linux certs package-management)
(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 Coutes")
(sysadmin "rekado" "Ricardo Wurmus")
(sysadmin "roptat" "Julien Lepiller")
(sysadmin "dannym" "Danny Milosavljevic")
(sysadmin "cbaines" "Christopher Baines")
(sysadmin "lfam" "Leo Famulari")))
(define gc-job
;; Run 'guix gc' at 3AM every day.
#~(job '(next-hour '(3)) "guix gc -F 200G"))
(define btrfs-balance-job
;; Re-allocate chunks which are using less than 5% of their chunk
;; space, to regain Btrfs 'unallocated' space. The usage is kept
;; low (5%) to minimize wear on the SSD. Runs at 5 AM every 3 days.
#~(job '(next-hour-from (next-day (range 1 31 3)) '(5))
(lambda ()
(system* #$(file-append btrfs-progs "/bin/btrfs")
"balance" "start" "-dusage=5" "/"))
"btrfs-balance"))
;; The actual machine.
(operating-system
(host-name "monokuma")
(timezone "Europe/London")
(locale "en_US.UTF-8")
(bootloader (bootloader-configuration
(bootloader grub-efi-bootloader)
(targets '("/boot/efi"))))
(initrd-modules (cons* "xhci-pci" "ahci_platform" "sg" "sd_mod"
%base-initrd-modules))
(file-systems (cons* (file-system
(device "/dev/sda2")
(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
(list (swap-space
(target "/dev/sda3"))))
(users (append %accounts %base-user-accounts))
(services (cons* (service openssh-service-type
(openssh-configuration
(password-authentication? #f)
(authorized-keys
`(("ludo" ,(local-file "keys/ssh/ludo.pub"))
("rekado" ,(local-file "keys/ssh/rekado.pub"))
("roptat" ,(local-file "keys/ssh/roptat.pub"))
("lfam" ,(local-file "keys/ssh/lfam.pub"))
("cbaines" ,(local-file "keys/ssh/cbaines.pub"))
("dannym" ,(local-file "keys/ssh/dannym.pub"))))))
(service dhcp-client-service-type)
(service mcron-service-type
(mcron-configuration
(jobs (list gc-job btrfs-balance-job))))
(service agetty-service-type
(agetty-configuration
(tty "ttyAMA0")
(keep-baud? #t)
(term "vt220")
(baud-rate "115200,38400,9600")))
(service ntp-service-type)
(service prometheus-node-exporter-service-type)
(service guix-build-coordinator-agent-service-type
(guix-build-coordinator-agent-configuration
(coordinator
"https://coordinator.bayfront.guix.gnu.org")
(authentication
(guix-build-coordinator-agent-password-file-auth
(uuid "5bbaa369-517d-49a1-9875-dc8fcf1e2e9f")
(password-file
"/etc/guix-build-coordinator-agent-password")))
(max-parallel-builds 4)
(systems '("aarch64-linux" "armhf-linux"))
(derivation-substitute-urls
(list "https://data.guix.gnu.org"
"https://data.qa.guix.gnu.org"))
(non-derivation-substitute-urls
(list "https://bordeaux.guix.gnu.org"))))
(modify-services %base-services
(guix-service-type
config => (guix-configuration
(inherit config)
(substitute-urls
'("https://bordeaux.guix.gnu.org"))
(max-silent-time (* 12 3600))
(timeout (* 48 3600))
(authorized-keys
(list
(local-file
"keys/guix/bordeaux.guix.gnu.org-export.pub")
(local-file "keys/guix/data.guix.gnu.org.pub")
(local-file "keys/guix/data.qa.guix.gnu.org.pub")))
(extra-options
'("--max-jobs=4")))))))
(packages (cons* btrfs-progs screen openssh strace nss-certs %base-packages)))