operating-systems: buer: Lots of updates

impermanence
Luis Guilherme Coelho 2024-04-26 18:55:38 -03:00
parent 4af74eead7
commit 59129886e0
No known key found for this signature in database
GPG Key ID: 1F2E76ACE3F531C8
4 changed files with 85 additions and 40 deletions

View File

@ -6,7 +6,6 @@
#|GNU packages|# #|GNU packages|#
#|A|# #:use-module (gnu packages admin) #|A|# #:use-module (gnu packages admin)
#:use-module (gnu packages android)
#|B|# #:use-module (gnu packages base) #|B|# #:use-module (gnu packages base)
#|C|# #:use-module (gnu packages certs) #|C|# #:use-module (gnu packages certs)
#:use-module (gnu packages compression) #:use-module (gnu packages compression)
@ -16,6 +15,8 @@
#|L|# #:use-module (gnu packages less) #|L|# #:use-module (gnu packages less)
#:use-module (gnu packages linux) #:use-module (gnu packages linux)
#|M|# #:use-module (gnu packages man) #|M|# #:use-module (gnu packages man)
#|P|# #:use-module (gnu packages package-management)
#:use-module (gnu packages pciutils)
#|S|# #:use-module (gnu packages shells) #|S|# #:use-module (gnu packages shells)
#|T|# #:use-module (gnu packages texinfo) #|T|# #:use-module (gnu packages texinfo)
#|V|# #:use-module (gnu packages vpn) #|V|# #:use-module (gnu packages vpn)
@ -57,11 +58,12 @@
#|M|# #:use-module (radix system monitoring) #|M|# #:use-module (radix system monitoring)
#|Buer|# #|Buer|#
#|S|# #:use-module (buer secrets) #|B|# #:use-module ((buer build-machines) #:prefix build-machine:)
#|C|# #:use-module ((buer channels) #:prefix channel:)
#|U|# #:use-module ((buer users) #:prefix user:)
#|Buer files|# #|Buer files|#
#|S|# #:use-module ((buer files substitute-keys) #:prefix substitute-key:) #|S|# #:use-module ((buer files substitute-keys) #:prefix substitute-key:)
#:use-module ((buer files ssh-keys) #:prefix ssh-key:)
#|T|# #:use-module ((buer files thinkfan) #:prefix file:thinkfan-) #|T|# #:use-module ((buer files thinkfan) #:prefix file:thinkfan-)
#|SRFIs|# #|SRFIs|#
@ -69,26 +71,6 @@
#:export (operating-system)) #:export (operating-system))
(define user:radio
(user-account
(name "radio")
(password %radio-password)
(home-directory "/home/radio")
(shell (file-append fish "/bin/fish"))
(uid 1000)
(group "users")
(supplementary-groups `("audio" "seat" "video" "wheel"))))
(define user:root
(user-account
(name "root")
(password %root-password)
(system? #t)
(home-directory "/root")
(uid 0)
(group "root")
(shell (file-append dash-next "/bin/dash"))))
(define operating-system (define operating-system
(gnu:operating-system (gnu:operating-system
(host-name "buer") (host-name "buer")
@ -154,8 +136,9 @@
#|guile |# guile-next guile-colorized guile-readline #|guile |# guile-next guile-colorized guile-readline
#|less |# less #|less |# less
#|linux |# e2fsprogs iproute kmod linux-libre-documentation #|linux |# e2fsprogs iproute kmod linux-libre-documentation
procps psmisc util-linux procps psmisc usbutils util-linux
#|man |# man-db man-pages #|man |# man-db man-pages
#|pciutils |# pciutils
#|shells |# dash-next #|shells |# dash-next
#|texinfo |# info-reader #|texinfo |# info-reader
#|text-editors|# kakoune #|text-editors|# kakoune
@ -189,7 +172,7 @@
(service seatd-service-type) (service seatd-service-type)
(service greetd-service-type (service greetd-service-type
(greetd-configuration (greetd-configuration
(greeter-supplementary-groups '("seat" "video")) (greeter-supplementary-groups `("seat" "video"))
(terminals (terminals
(map (lambda (x) (map (lambda (x)
(greetd-terminal-configuration (greetd-terminal-configuration
@ -222,20 +205,13 @@
#|Guix services|# #|Guix services|#
(service guix-service-type (service guix-service-type
(guix-configuration (guix-configuration
(discover? #t)
(build-accounts 16) (build-accounts 16)
#;(build-machines (discover? #t)
(list #~(build-machine (guix (guix-for-channels
(name "yumiko") (list channel:guix
(systems (list "x86_64-linux")) channel:radix)))
(host-key #$(plain-file-content
ssh-key:yumiko.pub))
(private-key "/root/.ssh/id_ed25519")
(user "radio")
(port 2222))))
(substitute-urls (substitute-urls
(cons* #;"http://substitutes.yumiko:8081" (cons "https://berlin.guix.gnu.org"
"https://berlin.guix.gnu.org"
%default-substitute-urls)) %default-substitute-urls))
(authorized-keys (authorized-keys
(cons* substitute-key:yuria.pub (cons* substitute-key:yuria.pub
@ -308,12 +284,11 @@
(thinkfan-configuration (thinkfan-configuration
(thinkfan thinkfan-next) (thinkfan thinkfan-next)
(config-file file:thinkfan-config))) (config-file file:thinkfan-config)))
(service thermald-service-type)
#|Memory management services|# #|Memory management services|#
(service zram-device-service-type (service zram-device-service-type
(zram-device-configuration (zram-device-configuration
(size (round/ (ram-total) 4)) (size (round/ (ram-total) 2))
(compression-algorithm 'lz4))) (compression-algorithm 'lz4)))
#|Doas configuration services|# #|Doas configuration services|#
@ -349,11 +324,13 @@
(list action service))))) (list action service)))))
'(networking wpa-supplicant) '(networking wpa-supplicant)
'(doc stop start enable status restart disable))) '(doc stop start enable status restart disable)))
#|Special file services|# #|Special file services|#
(service special-files-service-type (service special-files-service-type
`(("/bin/sh" ,(file-append dash-next "/bin/dash")) `(("/bin/sh" ,(file-append dash-next "/bin/dash"))
("/usr/bin/env" ,(file-append coreutils "/bin/env")))) ("/usr/bin/env" ,(file-append coreutils "/bin/env"))))
#|Sysctl services|#
(simple-service 'extra-sysctl-settings sysctl-service-type (simple-service 'extra-sysctl-settings sysctl-service-type
`(("vm.swappiness" . "180") `(("vm.swappiness" . "180")
("vm.watermark_boost_factor" . "0") ("vm.watermark_boost_factor" . "0")

View File

@ -0,0 +1,14 @@
(define-module (buer build-machines)
#:use-module ((buer files ssh-keys) #:prefix ssh-key:)
#:use-module (guix gexp)
#:export (yumiko))
(define yumiko
#~(build-machine
(name "yumiko")
(systems (list "x86_64-linux"))
(host-key #$(plain-file-content ssh-key:yumiko.pub))
(private-key "/root/.ssh/id_ed25519")
(user "radio")
(port 2222)))

View File

@ -0,0 +1,27 @@
(define-module (buer channels)
#:use-module (guix channels)
#:use-module (gnu packages package-management)
#:export (guix radix))
(define guix
(channel
(name 'guix)
(url "https://git.savannah.gnu.org/git/guix.git")
(branch "master")
(introduction
(make-channel-introduction
"9edb3f66fd807b096b48283debdcddccfea34bad"
(openpgp-fingerprint
"BBB0 2DDF 2CEA F6A8 0D1D E643 A2A0 6DF2 A33A 54FA")))))
(define radix
(channel
(name 'radix)
(url "https://codeberg.org/anemofilia/radix.git")
(branch "main")
(introduction
(make-channel-introduction
"f9130e11e35d2c147c6764ef85542dc58dc09c4f"
(openpgp-fingerprint
"F164 709E 5FC7 B32B AEC7 9F37 1F2E 76AC E3F5 31C8")))))

View File

@ -0,0 +1,27 @@
(define-module (buer users)
#:use-module (buer secrets)
#:use-module (gnu packages shells)
#:use-module (radix packages shells)
#:use-module (gnu system accounts)
#:use-module (guix gexp)
#:export (radio root))
(define radio
(user-account
(name "radio")
(password %radio-password)
(home-directory "/home/radio")
(shell (file-append fish "/bin/fish"))
(uid 1000)
(group "users")
(supplementary-groups `("audio" "seat" "video" "wheel"))))
(define root
(user-account
(name "root")
(password %root-password)
(home-directory "/root")
(uid 0)
(group "root")
(shell (file-append dash-next "/bin/dash"))))