guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: hydra: Add configuration of dover.


From: Andreas Enge
Subject: 01/02: hydra: Add configuration of dover.
Date: Sat, 9 Feb 2019 16:54:56 -0500 (EST)

andreas pushed a commit to branch master
in repository maintenance.

commit c009fdf4010194eabe840c07b13c072e87fc736f
Author: Andreas Enge <address@hidden>
Date:   Sat Feb 9 20:41:43 2019 +0100

    hydra: Add configuration of dover.
    
    * hydra/dover.scm: New file.
---
 hydra/dover.scm | 107 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 107 insertions(+)

diff --git a/hydra/dover.scm b/hydra/dover.scm
new file mode 100644
index 0000000..f14c20d
--- /dev/null
+++ b/hydra/dover.scm
@@ -0,0 +1,107 @@
+;; GuixSD configuration file for the SoftIron OverDrive 1000 build machines.
+;; Copyright © 2016, 2017, 2018 Ludovic Courtès <address@hidden>
+;; Copyright © 2019 Andreas Enge <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 vim)
+
+(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 "andreas" "Andreas Enge")
+        (user-account
+         (name "hydra")
+         (comment "Hydra User")
+         (group "users")
+         (home-directory (string-append "/home/" name)))
+        (user-account
+         (name "bayfront")
+         (comment "Bayfront Offload")
+         (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")
+        (local-file "keys/guix/bayfront.guix.info-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 "dover")
+  (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
+                             (permit-root-login 'without-password)
+                             (authorized-keys
+                              `(("ludo" ,(local-file "keys/ssh/ludo.pub"))
+                                ("rekado" ,(local-file "keys/ssh/rekado.pub"))
+                                ("andreas" ,(local-file 
"keys/ssh/andreas.pub"))
+                                ("root" ,(local-file 
"keys/ssh/andreas.pub"))))))
+                   (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 ntp-service-type)
+
+                   (modify-services %base-services
+                     (guix-service-type config =>
+                                        (guix-configuration
+                                         (inherit config)
+                                         (use-substitutes? #f)
+                                         (max-silent-time 7200)
+                                         (authorized-keys
+                                          %authorized-guix-keys))))))
+
+  (packages (cons* btrfs-progs screen openssh vim %base-packages)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]