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