From 5ab1b832b036fcbf533eec5930d8c203365359e2 Mon Sep 17 00:00:00 2001 From: Marek Paśnikowski Date: Thu, 26 Nov 2026 08:49:24 +0100 Subject: (specification): implement a Cuirass specification to build test branch of Deployment channel --- deployment/channels.scm | 4 ++-- deployment/services/cuirass.scm | 10 ++++----- deployment/specification.scm | 45 +++++++++++++++++++++++++++++++++++++++++ deployment/system.scm | 29 ++++++++++++++++++++++++++ 4 files changed, 81 insertions(+), 7 deletions(-) create mode 100644 deployment/specification.scm 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 . (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..f844c75 --- /dev/null +++ b/deployment/specification.scm @@ -0,0 +1,45 @@ +;;; SPDX-License-Identifier: GPL-3.0-or-later +;;; SPDX-FileCopyrightText: 2026 Marek Paśnikowski + +;;; COPYRIGHT NOTICE +;;; +;;; Copyright 2026, Marek Paśnikowski + +;;; 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 . + +(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")) + (is-active? #t) + (properties (list)))) + +;;; EOF diff --git a/deployment/system.scm b/deployment/system.scm index 0b411da..6ce8b85 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) @@ -249,3 +257,24 @@ (define mcdowell deployment:system:mcdowell:system) (define rakan deployment:system:rakan:system) + +(define-public (cuirass-jobs store arguments) + (list (derivation->job "vm.rakan" + (run-with-store store + (system-qemu-image/shared-store-script (gnu:system:operating-system + (inherit rakan) + (bootloader (bootloader-configuration + (bootloader grub-bootloader) + (targets (list "/dev/vda"))))) + #:system (%current-system) + #:target (%current-target-system) + #:qemu gnu:packages:virtualization:qemu + #:graphic? #f + #:volatile? #t + #:memory-size (expt 2 6) + #:full-boot? #f + #:spice #f + #:disk-image-size (expt 2 22) + #:options (list)))))) + +;;; EOF -- cgit v1.3