summaryrefslogtreecommitdiff
path: root/deployment/system.scm
blob: 0b411da8cdd4460dcf705030b542a02105ac98e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
;;; 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 system)
  #:export     (aisaka
                akashi
                asakura
                ayase
                cokolwiek
                mcdowell
                rakan)
  #:use-module (deployment system file-systems)
  #:use-module (deployment services vpn)
  #:use-module (gnu services)
  #:use-module (gnu services base)
  #:use-module (gnu system file-systems)
  #:use-module (gnu system shadow)
  #:use-module (guix gexp)
  #:use-module (sovereign system file-systems)
  #:use-module (sovereign systems)
  #:use-module (users id1000)
  #:use-module ((deployment system aisaka)
                #:prefix deployment:system:aisaka:)
  #:use-module ((deployment system akashi)
                #:prefix deployment:system:akashi:)
  #:use-module ((deployment system asakura)
                #:prefix deployment:system:asakura:)
  #:use-module ((deployment system ayase)
                #:prefix deployment:system:ayase:)
  #:use-module ((deployment system cokolwiek)
                #:prefix deployment:system:cokolwiek:)
  #:use-module ((deployment system mcdowell)
                #:prefix deployment:system:mcdowell:)
  #:use-module ((deployment system rakan)
                #:prefix deployment:system:rakan:)
  #:use-module ((gnu packages linux)
                #:prefix gnu:packages:linux:)
  #:use-module ((gnu packages tls)
                #:prefix gnu:packages:tls:)
  #:use-module ((gnu packages matrix)
                #:prefix gnu:packages:matrix:)
  #:use-module ((gnu system)
                #:prefix gnu:system:)
  #:use-module ((gnu system file-systems)
                #:prefix gnu:system:file-systems:)
  #:use-module ((gnu system linux-initrd)
                #:prefix gnu:system:linux-initrd:)
  #:use-module ((gnu system locale)
                #:prefix gnu:system:locale:)
  #:use-module ((gnu system nss)
                #:prefix gnu:system:nss:)
  #:use-module ((gnu system pam)
                #:prefix gnu:system:pam:)
  #:use-module ((gnu system shadow)
                #:prefix gnu:system:shadow:)
  #:use-module ((guix diagnostics)
                #:prefix guix:diagnostics:)
  #:use-module ((nongnu packages linux)
                #:prefix nongnu:packages:linux:)
  #:use-module ((nongnu system linux-initrd)
                #:prefix nongnu:system:linux-initrd:)
  #:use-module ((sovereign packages jekyll)
                #:prefix sovereign:packages:jekyll:)
  #:use-module ((sovereign services)
                #:prefix sovereign:services:)
  #:use-module ((sovereign systems)
                #:prefix sovereign:systems:)
  #:use-module ((users id1000)
                #:prefix users:id1000:)
  #:use-module ((users vmail)
                #:prefix users:vmail:))

(define aisaka
  (gnu:system:operating-system
   (kernel                  nongnu:packages:linux:linux)
   (kernel-loadable-modules (list))
   (kernel-arguments        gnu:system:%default-kernel-arguments)
   (hurd                    #f)
   (bootloader              deployment:system:aisaka:bootloader-aisaka)
   (label                   (sovereign:systems:operating-system-label* deployment:system:aisaka:host-name-aisaka
                                                                       gnu:system:this-operating-system))
   (keyboard-layout         deployment:system:aisaka:system-keyboard-layout)
   (initrd                  nongnu:system:linux-initrd:microcode-initrd)
   (initrd-modules          gnu:system:linux-initrd:%base-initrd-modules)
   (firmware                (list nongnu:packages:linux:linux-firmware))
   (host-name               deployment:system:aisaka:host-name-aisaka)
   (hosts-file              #f)
   (mapped-devices          (list))
   (file-systems            deployment:system:aisaka:file-systems)
   (swap-devices            (list))
   (users                   (cons* users:id1000:uid1000-account
                                   users:vmail:vmail-account
                                   gnu:system:shadow:%base-user-accounts))
   (groups                  (cons* deployment:system:aisaka:vmail-group
                                   gnu:system:shadow:%base-groups))
   (skeletons               (gnu:system:shadow:default-skeletons))
   (issue                   (@@ (gnu system)
                                %default-issue))
   (packages                (cons* sovereign:packages:jekyll:custom-jekyll
                                   gnu:packages:tls:openssl
                                   gnu:system:%base-packages))
   (timezone                "Europe/Warsaw")
   (locale                  sovereign:systems:pl-locale)
   (locale-definitions      sovereign:systems:%sovereign-locale-definitions)
   (locale-libcs            gnu:system:locale:%default-locale-libcs)
   (name-service-switch     gnu:system:nss:%default-nss)
   (essential-services      (gnu:system:operating-system-default-essential-services gnu:system:this-operating-system))
   (services                deployment:system:aisaka:services)
   (pam-services            (gnu:system:pam:base-pam-services))
   (privileged-programs     gnu:system:%default-privileged-programs)
   (setuid-programs         gnu:system:%setuid-programs)
   (sudoers-file            sovereign:systems:%sovereign-sudoers-specification)
   (location                (and=> (current-source-location)
                                   guix:diagnostics:source-properties->location))))

(define akashi deployment:system:akashi:system)

(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"

                           ;; 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)