Luo lista kaikista käyttöjärjestelmistä

This commit is contained in:
Saku Laesvuori 2026-08-19 09:38:59 +03:00
parent e6cda914b4
commit bd228c91f6
Signed by: slaesvuo
GPG Key ID: 257D284A2A1D3A32

View File

@ -23,7 +23,8 @@
#:use-module (oms home)
#:use-module (sops secrets)
#:use-module (sops services sops)
#:export (base-operating-system))
#:export (base-operating-system
%oms-systems))
(define default-gsettings
#~(string-append "\
@ -196,9 +197,12 @@ sources=[('xkb', 'fi')]"))
(format #t "Latest generation is from ~a. No need to upgrade.~%"
(date->string (time-utc->date latest-generation))))))))
(define %oms-systems '())
(define-syntax-rule (define-system id os)
"Extend the operating system OS with unattended upgrades and define a varible
ID with the extended system as it's value."
(begin
(define-public id
(let ((base os))
(operating-system
@ -229,7 +233,8 @@ ID with the extended system as it's value."
(one-shot? #t)
(start #~(make-forkexec-constructor
(list #$upgrade-if-needed-script)))))))
(operating-system-user-services base)))))))
(operating-system-user-services base))))))
(set! %oms-systems (cons id %oms-systems))))
(define-system oms-morn (base-operating-system "OMS-morn"))