summaryrefslogtreecommitdiff
path: root/deployment
diff options
context:
space:
mode:
authorMarek Paśnikowski <marek@marekpasnikowski.pl>2026-11-26 08:49:24 +0100
committerMarek Paśnikowski <marek@marekpasnikowski.pl>2026-11-30 20:31:23 +0100
commit8d86bc900495c8a6267ee88969ec1ce8529c7a00 (patch)
tree0f39aa0621bf21eba7bdabaa7aedd75e96f60271 /deployment
parent43f0beb42432c4d07f2763e54cbf5c6b719c2475 (diff)
(specification): implement a Cuirass specification to build test branch of Deployment channeltest
Diffstat (limited to 'deployment')
-rw-r--r--deployment/channels.scm4
-rw-r--r--deployment/services/cuirass.scm10
-rw-r--r--deployment/specification.scm46
-rw-r--r--deployment/system.scm252
4 files changed, 197 insertions, 115 deletions
diff --git a/deployment/channels.scm b/deployment/channels.scm
index fe20a4d..b75a39e 100644
--- a/deployment/channels.scm
+++ b/deployment/channels.scm
@@ -29,7 +29,7 @@
(define master-channels
(list (default-guix-channel "master")
(deployment-channel "master")
- (mnt-reform-nonguix "personal")
+ ;; (mnt-reform-nonguix "personal")
(nonguix-channel "master")
(rde-channel "master")
(sovereign-channel "master")))
@@ -37,7 +37,7 @@
(define test-channels
(list (default-guix-channel "test")
(deployment-channel "test")
- (mnt-reform-nonguix "personal")
+ ;; (mnt-reform-nonguix "personal")
(nonguix-channel "test")
(rde-channel "master")
(sovereign-channel "test")))
diff --git a/deployment/services/cuirass.scm b/deployment/services/cuirass.scm
index 886091d..d06883a 100644
--- a/deployment/services/cuirass.scm
+++ b/deployment/services/cuirass.scm
@@ -19,19 +19,19 @@
;;; If not, see <https://www.gnu.org/licenses/>.
(define-module (deployment services cuirass)
+ #:export (cuirass-rakan_configuration-record)
#:use-module (gnu services cuirass)
#:use-module (guix gexp)
+ #:use-module ((deployment specification)
+ #:prefix deployment:specification:)
#:use-module ((gnu packages ci)
#:prefix gnu:packages:ci:)
#:use-module ((sovereign services cuirass)
- #:prefix sovereign:services:cuirass:)
- #:export (cuirass-rakan_configuration-record))
+ #:prefix sovereign:services:cuirass:))
(define cuirass-rakan_configuration-record
(cuirass-configuration
(inherit sovereign:services:cuirass:cuirass_configuration-record)
- (specifications #~(list (specification
- (name 'my-test-linux)
- (build '(packages "linux-libre")))))))
+ (specifications #~(list (ungexp deployment:specification:cuirass-deployment-test_specification-record)))))
;;; EOF
diff --git a/deployment/specification.scm b/deployment/specification.scm
new file mode 100644
index 0000000..6cbdc56
--- /dev/null
+++ b/deployment/specification.scm
@@ -0,0 +1,46 @@
+;;; SPDX-License-Identifier: GPL-3.0-or-later
+;;; SPDX-FileCopyrightText: 2026 Marek Paśnikowski <marek@marekpasnikowski.pl>
+
+;;; COPYRIGHT NOTICE
+;;;
+;;; Copyright 2026, Marek Paśnikowski <marek@marekpasnikowski.pl>
+
+;;; LICENSE NOTICE
+;;;
+;;; This library is free software: you can redistribute it and/or modify it under the terms of
+;;; the GNU General Public License as published by the Free Software Foundation,
+;;; either version 3 of the License, or (at your option) any later version.
+;;;
+;;; This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+;;; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+;;; See the GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License along with this library.
+;;; If not, see <https://www.gnu.org/licenses/>.
+
+(define-module (deployment specification)
+ #:export (cuirass-deployment-test_specification-record)
+ #:use-module ((deployment channels)
+ #:prefix deployment:channels:)
+ #:use-module ((guix channels)
+ #:prefix guix:channels:))
+
+(define (channels->code channels_list)
+ `(list ,@(map guix:channels:channel->code
+ channels_list)))
+
+(define cuirass-deployment-test_specification-record
+ `(specification
+ (name 'deployment-channel-test)
+ (build '(custom (deployment system)))
+ (channels ,(channels->code deployment:channels:test-channels))
+ (build-outputs (list))
+ (notifications (list))
+ (period 0)
+ (priority 9)
+ (systems (list "x86_64-linux"
+ "aarch64-linux"))
+ (is-active? #t)
+ (properties (list))))
+
+;;; EOF
diff --git a/deployment/system.scm b/deployment/system.scm
index 0b411da..9f94942 100644
--- a/deployment/system.scm
+++ b/deployment/system.scm
@@ -28,11 +28,17 @@
rakan)
#:use-module (deployment system file-systems)
#:use-module (deployment services vpn)
+ #:use-module (gnu bootloader)
+ #:use-module (gnu bootloader grub)
+ #:use-module (gnu ci)
#:use-module (gnu services)
#:use-module (gnu services base)
#:use-module (gnu system file-systems)
#:use-module (gnu system shadow)
+ #:use-module (gnu system vm)
#:use-module (guix gexp)
+ #:use-module (guix store)
+ #:use-module (guix utils)
#:use-module (sovereign system file-systems)
#:use-module (sovereign systems)
#:use-module (users id1000)
@@ -56,6 +62,8 @@
#:prefix gnu:packages:tls:)
#:use-module ((gnu packages matrix)
#:prefix gnu:packages:matrix:)
+ #:use-module ((gnu packages virtualization)
+ #:prefix gnu:packages:virtualization:)
#:use-module ((gnu system)
#:prefix gnu:system:)
#:use-module ((gnu system file-systems)
@@ -134,118 +142,146 @@
(define asakura deployment:system:asakura:system)
-(define ayase
- (gnu:system:operating-system
- (inherit sovereign:systems:%sovereign-operating-system)
- (kernel deployment:system:ayase:kernel)
- (kernel-arguments (list "no_console_suspend"
- "cryptomgr.notests"
- "loglevel=3"
- "clk_ignore_unused"
- "cma=256M"
- "swiotlb=65535"
- "console=tty1"))
- (bootloader deployment:system:ayase:bootloader)
- (label "ayase")
- (keyboard-layout sovereign:systems:keyboard-layout)
- (initrd-modules (list "rfkill"
- "dm_mod"
- "rk805_pwrkey"
- "hantro_vpu"
- "snd_soc_wm8960"
- ;; "rockchip_vdec2"
- "v4l2_vp9"
- "rockchip_saradc"
- "v4l2_h264"
- "v4l2_jpeg"
- "industrialio_triggered_buffer"
- "v4l2_mem2mem"
- "rockchip_thermal"
- "kfifo_buf"
- "snd_soc_rockchip_i2s_tdm"
- "videobuf2_dma_contig"
- "videobuf2_memops"
- "videobuf2_v4l2"
- "panthor"
- "videodev"
- "drm_gpuvm"
- "videobuf2_common"
- "drm_exec"
- "snd_soc_audio_graph_card"
- "mc"
- "drm_shmem_helper"
- "gpu_sched"
- "snd_soc_simple_card_utils"
- "pci_endpoint_test"
- "fuse"
- ;; "ip_tables"
- "x_tables"
- "ipv6"
- "onboard_usb_dev"
- "dwmac_rk"
- "stmmac_platform"
- "stmmac"
- ;; "crct10dif_ce"
- "phy_rockchip_naneng_combphy"
- "phy_rockchip_usbdp"
- "typec"
- "rtc_pcf8523"
- "phy_rockchip_samsung_hdptx"
- "pcs_xpcs"
- "nvme"
- "nvme_core"
- "rockchipdrm"
- "analogix_dp"
- "dw_hdmi_qp"
- "dw_mipi_dsi"
+;; (define ayase
+;; (gnu:system:operating-system
+;; (inherit sovereign:systems:%sovereign-operating-system)
+;; (kernel deployment:system:ayase:kernel)
+;; (kernel-arguments (list "no_console_suspend"
+;; "cryptomgr.notests"
+;; "loglevel=3"
+;; "clk_ignore_unused"
+;; "cma=256M"
+;; "swiotlb=65535"
+;; "console=tty1"))
+;; (bootloader deployment:system:ayase:bootloader)
+;; (label "ayase")
+;; (keyboard-layout sovereign:systems:keyboard-layout)
+;; (initrd-modules (list "rfkill"
+;; "dm_mod"
+;; "rk805_pwrkey"
+;; "hantro_vpu"
+;; "snd_soc_wm8960"
+;; ;; "rockchip_vdec2"
+;; "v4l2_vp9"
+;; "rockchip_saradc"
+;; "v4l2_h264"
+;; "v4l2_jpeg"
+;; "industrialio_triggered_buffer"
+;; "v4l2_mem2mem"
+;; "rockchip_thermal"
+;; "kfifo_buf"
+;; "snd_soc_rockchip_i2s_tdm"
+;; "videobuf2_dma_contig"
+;; "videobuf2_memops"
+;; "videobuf2_v4l2"
+;; "panthor"
+;; "videodev"
+;; "drm_gpuvm"
+;; "videobuf2_common"
+;; "drm_exec"
+;; "snd_soc_audio_graph_card"
+;; "mc"
+;; "drm_shmem_helper"
+;; "gpu_sched"
+;; "snd_soc_simple_card_utils"
+;; "pci_endpoint_test"
+;; "fuse"
+;; ;; "ip_tables"
+;; "x_tables"
+;; "ipv6"
+;; "onboard_usb_dev"
+;; "dwmac_rk"
+;; "stmmac_platform"
+;; "stmmac"
+;; ;; "crct10dif_ce"
+;; "phy_rockchip_naneng_combphy"
+;; "phy_rockchip_usbdp"
+;; "typec"
+;; "rtc_pcf8523"
+;; "phy_rockchip_samsung_hdptx"
+;; "pcs_xpcs"
+;; "nvme"
+;; "nvme_core"
+;; "rockchipdrm"
+;; "analogix_dp"
+;; "dw_hdmi_qp"
+;; "dw_mipi_dsi"
- ;; Some taken from in %base-initrd-modules a.k.a. default-initrd-modules
- ;; May not be strictly needed... but you never know.
- "ahci"
- "dm-crypt"
- "xts"
- ))
- (firmware (list ;; arm-trusted-firmware-rk3588
- nongnu:packages:linux:linux-firmware
- gnu:packages:linux:wireless-regdb))
- (host-name "ayase")
- (file-systems (cons* (file-system
- (device (file-system-label "ayase-root"))
- (mount-point "/")
- (type "ext4"))
- file-system-dokumenty
- file-system-szablony
- %base-file-systems))
- ;; (swap-devices )
- (users (cons* uid1000-account
- %base-user-accounts))
- (skeletons (gnu:system:shadow:default-skeletons))
- (timezone "Europe/Warsaw")
- (locale "pl_PL.utf8")
- (services (cons* wireguard-service-ayase
- (guix-home-service (list named-home-environment))
- (simple-service 'offload-extension
- guix-service-type
- (guix-extension
- (authorized-keys (list (mixed-text-file "aisaka-guix-key.pub"
- "(public-key\n"
- " (ecc\n"
- " (curve Ed25519)\n"
- " (q #983CD313090D2699AD26AE5CB589A29F24A32E247A41EB4F4A22D196DFCD9D3C#)))")))
- (build-machines (list #~(build-machine
- (name "www.marekpasnikowski.pl")
- (systems (list "x86_64-linux"
- "i686-linux"
- "aarch64-linux"))
- (user "marek")
- (host-key "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM0Eh0q54myeSEironEP9DEKl+ownYuH7oSgAVuLIDNt root@aisaka")
- (port 23)
- (private-key "/home/marek/.ssh/id_ed25519"))))))
- %sovereign-services))
- (sudoers-file sovereign:systems:%sovereign-sudoers-specification)))
+;; ;; Some taken from in %base-initrd-modules a.k.a. default-initrd-modules
+;; ;; May not be strictly needed... but you never know.
+;; "ahci"
+;; "dm-crypt"
+;; "xts"
+;; ))
+;; (firmware (list ;; arm-trusted-firmware-rk3588
+;; nongnu:packages:linux:linux-firmware
+;; gnu:packages:linux:wireless-regdb))
+;; (host-name "ayase")
+;; (file-systems (cons* (file-system
+;; (device (file-system-label "ayase-root"))
+;; (mount-point "/")
+;; (type "ext4"))
+;; file-system-dokumenty
+;; file-system-szablony
+;; %base-file-systems))
+;; ;; (swap-devices )
+;; (users (cons* uid1000-account
+;; %base-user-accounts))
+;; (skeletons (gnu:system:shadow:default-skeletons))
+;; (timezone "Europe/Warsaw")
+;; (locale "pl_PL.utf8")
+;; (services (cons* wireguard-service-ayase
+;; (guix-home-service (list named-home-environment))
+;; (simple-service 'offload-extension
+;; guix-service-type
+;; (guix-extension
+;; (authorized-keys (list (mixed-text-file "aisaka-guix-key.pub"
+;; "(public-key\n"
+;; " (ecc\n"
+;; " (curve Ed25519)\n"
+;; " (q #983CD313090D2699AD26AE5CB589A29F24A32E247A41EB4F4A22D196DFCD9D3C#)))")))
+;; (build-machines (list #~(build-machine
+;; (name "www.marekpasnikowski.pl")
+;; (systems (list "x86_64-linux"
+;; "i686-linux"
+;; "aarch64-linux"))
+;; (user "marek")
+;; (host-key "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIM0Eh0q54myeSEironEP9DEKl+ownYuH7oSgAVuLIDNt root@aisaka")
+;; (port 23)
+;; (private-key "/home/marek/.ssh/id_ed25519"))))))
+;; %sovereign-services))
+;; (sudoers-file sovereign:systems:%sovereign-sudoers-specification)))
(define cokolwiek deployment:system:cokolwiek:system)
(define mcdowell deployment:system:mcdowell:system)
(define rakan deployment:system:rakan:system)
+
+(define (module-operating-systems module-name)
+ (let ((module (resolve-interface module-name)))
+ (sort
+ (filter
+ (lambda (name)
+ (let ((var (module-variable module name)))
+ (and (variable-bound? var)
+ (gnu:system:operating-system?
+ (variable-ref var)))))
+ (module-map (lambda (name var) name) module))
+ (lambda (a b)
+ (string<? (symbol->string a) (symbol->string b))))))
+
+(define (os-jobs store module-name)
+ (map (lambda (system-name)
+ (derivation->job
+ (symbol->string system-name)
+ (run-with-store store
+ (gnu:system:operating-system-derivation (module-ref (resolve-interface module-name)
+ system-name)))))
+ (module-operating-systems module-name)))
+
+(define-public (cuirass-jobs store arguments)
+ (os-jobs store
+ '(deployment system)))
+
+;;; EOF